From: Andrea Arcangeli <andrea@suse.de>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: James Bottomley <James.Bottomley@steeleye.com>,
William Lee Irwin III <wli@holomorphy.com>,
Linux Arch list <linux-arch@vger.kernel.org>,
Jeff Garzik <jgarzik@pobox.com>,
Russell King <rmk@arm.linux.org.uk>,
Linus Torvalds <torvalds@osdl.org>,
David Woodhouse <dwmw2@infradead.org>,
Christoph Hellwig <hch@infradead.org>,
Andrew Morton <akpm@osdl.org>
Subject: Re: can device drivers return non-ram via vm_ops->nopage?
Date: Mon, 22 Mar 2004 12:58:07 +0100 [thread overview]
Message-ID: <20040322115807.GO3649@dualathlon.random> (raw)
In-Reply-To: <1079933188.22188.5.camel@gaston>
On Mon, Mar 22, 2004 at 04:26:29PM +1100, Benjamin Herrenschmidt wrote:
> Well, I just went over this whole discussion and I think it's just
> going to hell.
>
> So here are my 2 cents of suggestions:
>
> - We _WANT_ the ability to map coherent memory to userspace, that's
> the normal way to map sound buffers to userland for low latency (though
> mapping the actual DMA ptrs is a different matter and is definitely not
> working with a bunch of sound interfaces). This is also necessary for
> the infiniband/myrinet kind of things. DRI sort-of need that when not
> using AGP, AGP itself is a special case but could be considered as
> coherent memory in some platforms too (and will be with PCI Express
> afaik) etc...
>
> - Some architectures apparently cannot do that (parisc ?)
>
> - Too bad for them... They won't have low latency audio and fast
> networking and be done with it. Let's implement a couple of simple
> to use (driver-wise) helpers
>
> dma_can_mmap_coherent() -> parisc returns false here
> dma_mmap_coherent()
> dma_mmap_coherent_sg()
>
> And be done with it. I don't see where is the debate here ? The
> API takes the same sglist as used for dma_map_sg, I don't see the
> point of anything different, I agree with linus that it's not worth
> even thinking about not having struct page here.
I like your three functions and the clear decription.
The only reason I believe a paging mechanism would been nicer, is that
it would avoid latencies in dma_mmap_coherent (not necessairly scheduler
latencies, but you would pay all the cost of the pagetables immediatly
during the mmap syscall, so if you've to map gigs of ram that would tend
to hang the task doing the mmap a little bit, I found it nicer to use
the paging for this so we also only allocate the memory for the
pagetables that we need, but OTOH Linus's right that in most cases it
doesn't worth a single branch in a fast path).
next prev parent reply other threads:[~2004-03-22 11:57 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20040321204931.A11519@infradead.org>
[not found] ` <1079902670.17681.324.camel@imladris.demon.co.uk>
[not found] ` <Pine.LNX.4.58.0403211349340.1106@ppc970.osdl.org>
[not found] ` <20040321222327.D26708@flint.arm.linux.org.uk>
[not found] ` <405E1859.5030906@pobox.com>
[not found] ` <20040321225117.F26708@flint.arm.linux.org.uk>
[not found] ` <Pine.LNX.4.58.0403211504550.1106@ppc970.osdl.org>
[not found] ` <20040321234515.G26708@flint.arm.linux.org.uk>
[not found] ` <20040322002349.GZ2045@holomorphy.com>
[not found] ` <405E3387.1050505@pobox.com>
2004-03-22 3:45 ` can device drivers return non-ram via vm_ops->nopage? William Lee Irwin III
2004-03-22 4:41 ` James Bottomley
2004-03-22 4:46 ` William Lee Irwin III
2004-03-22 4:56 ` James Bottomley
2004-03-22 5:26 ` Benjamin Herrenschmidt
2004-03-22 11:58 ` Andrea Arcangeli [this message]
2004-03-22 12:05 ` Russell King
2004-03-22 12:34 ` Andrea Arcangeli
2004-03-22 9:30 ` Russell King
2004-03-22 15:04 ` James Bottomley
2004-03-22 15:15 ` Russell King
2004-03-22 15:27 ` James Bottomley
2004-03-22 21:50 ` Benjamin Herrenschmidt
2004-03-22 22:18 ` Jeff Garzik
2004-03-22 22:35 ` William Lee Irwin III
2004-03-22 23:57 ` Benjamin Herrenschmidt
2004-03-23 0:22 ` David Woodhouse
2004-03-23 2:07 ` William Lee Irwin III
2004-03-23 9:28 ` Russell King
2004-03-23 9:34 ` David Woodhouse
2004-03-23 10:04 ` Russell King
2004-03-23 10:05 ` William Lee Irwin III
2004-03-23 11:29 ` Benjamin Herrenschmidt
2004-03-23 11:35 ` Andrea Arcangeli
2004-03-23 11:44 ` William Lee Irwin III
2004-03-23 12:34 ` Andrea Arcangeli
2004-03-23 12:40 ` Russell King
2004-03-23 15:25 ` Linus Torvalds
2004-03-23 15:36 ` Andrea Arcangeli
2004-03-23 15:46 ` Linus Torvalds
2004-03-23 15:50 ` Russell King
2004-03-23 22:10 ` Benjamin Herrenschmidt
2004-03-25 20:25 ` Russell King
2004-03-28 10:17 ` Russell King
2004-03-23 12:49 ` William Lee Irwin III
2004-03-22 23:19 ` Russell King
2004-03-22 23:35 ` Jeff Garzik
2004-03-23 2:26 ` James Bottomley
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=20040322115807.GO3649@dualathlon.random \
--to=andrea@suse.de \
--cc=James.Bottomley@steeleye.com \
--cc=akpm@osdl.org \
--cc=benh@kernel.crashing.org \
--cc=dwmw2@infradead.org \
--cc=hch@infradead.org \
--cc=jgarzik@pobox.com \
--cc=linux-arch@vger.kernel.org \
--cc=rmk@arm.linux.org.uk \
--cc=torvalds@osdl.org \
--cc=wli@holomorphy.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