linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Mundt <lethal@linux-sh.org>
To: Matthew Wilcox <matthew@wil.cx>
Cc: James Bottomley <James.Bottomley@steeleye.com>,
	linux-arch@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com,
	hpa@zytor.com, linux-scsi@vger.kernel.org, jejb@steeleye.com,
	Matthew Wilcox <willy@linux.intel.com>
Subject: Re: [PATCH 2/2] Remove dma_coherent_mem interface
Date: Wed, 31 Oct 2007 14:49:23 +0900	[thread overview]
Message-ID: <20071031054923.GA21176@linux-sh.org> (raw)
In-Reply-To: <20071030203514.GC15111@parisc-linux.org>

On Tue, Oct 30, 2007 at 02:35:14PM -0600, Matthew Wilcox wrote:
> On Tue, Oct 30, 2007 at 03:26:31PM -0500, James Bottomley wrote:
> > Its design was basically to facilitate the use of bus remote memory.
> > There's a long thread somewhere discussing this with the ARM people.
> > They had some type of SoC implementation that needed to allocate local
> > memory for device descriptors.  The Q720 is pretty much the same way, so
> > I used it to build the implementation when I created it for the ARM
> > people.  This is the original thread:
> > 
> > http://marc.info/?t=108757862100001
> > 
> > They said they were implementing this system, so I've no idea what
> > happened.
> 
> It's been over three years, and it hasn't happened.
> 
> > However, what are the problems the API is causing?  it seems
> > useful, so there should be a preference in its favour of existence
> > unless it's causing a problem.
> 
> What I'm currently looking at is the dmapool allocator.  It's not
> exactly fast (a spinlock for each allocation ... no concept of cpu
> affinity, etc), and some drivers (eg qla2xxx) use it in the performance
> path.
> 
> One of the suggestions in the existing dmapool driver is to share the
> guts of slab.  Well, slab is probably going away, so I took a look
> at slub.  Slub really, *really* needs the struct page associated
> with the page of memory allocated, so I'm currently working my way
> through the architectures trying to turn dma_alloc_coherent into
> dma_alloc_coherent_pages.
> 
> The dma_coherent_mem API is one of the things which gets in the way of
> doing this.  So I deleted it, then sent the patch out for comments early.
> 
We have some out-of-tree users for this on SH as well, particularly the
SM501 MFD USB driver which needs to do 8051-local allocations. We have an
in-tree hack for this now, I never bothered pushing the
dma_declare_coherent_memory() bits due to the fact the driver hadn't been
merged yet, but I had planned on merging both for 2.6.25.

We can continue using the in-tree hack if there aren't going to be any
other users of this API and it's causing problems elsewhere, but I do
expect that we will continue to see devices with a need for this sort of
API. I would imagine that the ARM case is similar, even if it's been a
low priority item.

      reply	other threads:[~2007-10-31  6:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-30 19:43 [PATCH 1/2] Wean NCR_Q720 off the dma_declare_coherent_memory interface Matthew Wilcox
2007-10-30 19:43 ` [PATCH 2/2] Remove dma_coherent_mem interface Matthew Wilcox
2007-10-30 20:26   ` James Bottomley
2007-10-30 20:35     ` Matthew Wilcox
2007-10-31  5:49       ` Paul Mundt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071031054923.GA21176@linux-sh.org \
    --to=lethal@linux-sh.org \
    --cc=James.Bottomley@steeleye.com \
    --cc=hpa@zytor.com \
    --cc=jejb@steeleye.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=matthew@wil.cx \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=willy@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).