From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
To: linux@arm.linux.org.uk
Cc: fujita.tomonori@lab.ntt.co.jp, alan@lxorguk.ukuu.org.uk,
randy.dunlap@oracle.com, dwalker@codeaurora.org, mel@csn.ul.ie,
linux-arm-msm@vger.kernel.org, joro@8bytes.org,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
andi@firstfloor.org, zpfeffer@codeaurora.org,
linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [RFC 3/3] mm: iommu: The Virtual Contiguous Memory Manager
Date: Wed, 14 Jul 2010 10:59:43 +0900 [thread overview]
Message-ID: <20100714105922D.fujita.tomonori@lab.ntt.co.jp> (raw)
In-Reply-To: <20100713090223.GB20590@n2100.arm.linux.org.uk>
On Tue, 13 Jul 2010 10:02:23 +0100
Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> On Tue, Jul 13, 2010 at 05:45:39PM +0900, FUJITA Tomonori wrote:
> > Drivers can tell the USB layer that these are vmapped buffers? Adding
> > something to struct urb? I might be totally wrong since I don't know
> > anything about the USB layer.
>
> With non-DMA coherent aliasing caches, you need to know where the page
> is mapped into the virtual address space, so you can deal with aliases.
>
> You'd need to tell the USB layer about the other mappings of the page
> which you'd like to be coherent (such as the vmalloc area - and there's
> also the possible userspace mapping to think about too, but that's
> a separate issue.)
>
> I wonder if we should have had:
>
> vmalloc_prepare_dma(void *, size_t, enum dma_direction)
> vmalloc_finish_dma(void *, size_t, enum dma_direction)
>
> rather than flush_kernel_vmap_range and invalidate_kernel_vmap_range,
> which'd make their use entirely obvious.
>
> However, this brings up a question - how does the driver (eg, v4l, xfs)
> which is preparing the buffer for another driver (eg, usb host, block
> dev) know that DMA will be performed on the buffer rather than PIO?
>
> That's a very relevant question, because for speculatively prefetching
> CPUs, we need to invalidate caches after a DMA-from-device operation -
> but if PIO-from-device happened, this would destroy data read from the
> device.
>
> That problem goes away if we decide that PIO drivers must have the same
> apparant semantics as DMA drivers - in that data must end up beyond the
> point of DMA coherency (eg, physical page) - but that's been proven to
> be very hard to achieve, especially with block device drivers.
Yeah, the last thing we want to do is converting all the PIO drivers.
Seems that we are far from the original discussion (the most of the
above topics have been discussed in the past and we kinda agree that
we have to do something some time, I guess).
Zach Pfeffer said this new VCM infrastructure can be useful for
video4linux. However, I don't think we need 3,000-lines another
abstraction layer to solve video4linux's issue nicely.
I can't find any reasonable reasons that we need to merge VCM; seems
that the combination of the current APIs (or with some small
extensions) can work for the issues that VCM tries to solve.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2010-07-14 2:00 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-30 5:55 [RFC 1/3] mm: iommu: An API to unify IOMMU, CPU and device memory management Zach Pfeffer
2010-06-30 5:55 ` [RFC 2/3] mm: iommu: A physical allocator for the VCMM Zach Pfeffer
2010-06-30 5:55 ` [RFC 3/3] mm: iommu: The Virtual Contiguous Memory Manager Zach Pfeffer
2010-07-01 17:17 ` Randy Dunlap
2010-07-01 18:02 ` Andi Kleen
2010-07-01 19:28 ` Daniel Walker
2010-07-01 19:38 ` Andi Kleen
2010-07-01 19:42 ` Daniel Walker
2010-07-01 22:15 ` Hari Kanigeri
2010-07-02 7:09 ` Zach Pfeffer
2010-07-10 14:36 ` Joerg Roedel
2010-07-13 5:21 ` Zach Pfeffer
2010-07-14 19:34 ` Joerg Roedel
2010-07-15 1:18 ` Zach Pfeffer
2010-07-01 22:00 ` Zach Pfeffer
2010-07-01 22:05 ` Daniel Walker
2010-07-02 7:33 ` Zach Pfeffer
2010-07-10 14:56 ` Joerg Roedel
2010-07-13 5:46 ` Zach Pfeffer
2010-07-13 5:59 ` FUJITA Tomonori
2010-07-13 8:20 ` Alan Cox
2010-07-13 8:30 ` FUJITA Tomonori
2010-07-13 8:42 ` Alan Cox
2010-07-13 8:45 ` FUJITA Tomonori
2010-07-13 9:02 ` Russell King - ARM Linux
2010-07-14 1:59 ` FUJITA Tomonori [this message]
2010-07-22 3:50 ` Zach Pfeffer
2010-07-22 4:47 ` FUJITA Tomonori
2010-07-22 16:33 ` Zach Pfeffer
2010-07-22 7:51 ` Russell King - ARM Linux
2010-07-22 16:13 ` Zach Pfeffer
2010-07-13 12:06 ` Zach Pfeffer
2010-07-01 22:51 ` Hari Kanigeri
2010-07-02 7:29 ` Zach Pfeffer
2010-07-01 23:00 ` Andi Kleen
2010-07-02 6:17 ` Zach Pfeffer
2010-07-02 8:22 ` Andi Kleen
2010-07-02 18:42 ` Zach Pfeffer
2010-07-10 15:11 ` Joerg Roedel
2010-07-13 5:52 ` Zach Pfeffer
2010-07-03 6:36 ` Zach Pfeffer
2010-07-10 14:54 ` Joerg Roedel
2010-07-13 5:27 ` Zach Pfeffer
2010-07-01 20:59 ` Paul Walmsley
2010-07-01 21:48 ` Randy Dunlap
2010-06-30 23:40 ` [RFC 1/3] mm: iommu: An API to unify IOMMU, CPU and device memory management Randy Dunlap
2010-07-01 7:16 ` Zach Pfeffer
2010-07-02 7:00 ` Paul Mundt
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=20100714105922D.fujita.tomonori@lab.ntt.co.jp \
--to=fujita.tomonori@lab.ntt.co.jp \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=andi@firstfloor.org \
--cc=dwalker@codeaurora.org \
--cc=joro@8bytes.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mel@csn.ul.ie \
--cc=randy.dunlap@oracle.com \
--cc=zpfeffer@codeaurora.org \
/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