[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100715054050.GB3623@codeaurora.org>
Date: Wed, 14 Jul 2010 22:40:51 -0700
From: Zach Pfeffer <zpfeffer@...eaurora.org>
To: "Eric W. Biederman" <ebiederm@...ssion.com>
Cc: Russell King - ARM Linux <linux@....linux.org.uk>,
FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>,
linux-arch@...r.kernel.org, dwalker@...eaurora.org, mel@....ul.ie,
linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, andi@...stfloor.org,
linux-omap@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [RFC 1/3 v3] mm: iommu: An API to unify IOMMU, CPU and device
memory management
On Wed, Jul 14, 2010 at 06:47:34PM -0700, Eric W. Biederman wrote:
> Zach Pfeffer <zpfeffer@...eaurora.org> writes:
>
> > On Wed, Jul 14, 2010 at 11:05:36PM +0100, Russell King - ARM Linux wrote:
> >> On Wed, Jul 14, 2010 at 01:11:49PM -0700, Zach Pfeffer wrote:
> >> > If the DMA-API contained functions to allocate virtual space separate
> >> > from physical space and reworked how chained buffers functioned it
> >> > would probably work - but then things start to look like the VCM API
> >> > which does graph based map management.
> >>
> >> Every additional virtual mapping of a physical buffer results in
> >> additional cache aliases on aliasing caches, and more workload for
> >> developers to sort out the cache aliasing issues.
> >>
> >> What does VCM to do mitigate that?
> >
> > The VCM ensures that all mappings that map a given physical buffer:
> > IOMMU mappings, CPU mappings and one-to-one device mappings all map
> > that buffer using the same (or compatible) attributes. At this point
> > the only attribute that users can pass is CACHED. In the absence of
> > CACHED all accesses go straight through to the physical memory.
> >
> > The architecture of the VCM allows these sorts of consistency checks
> > to be made since all mappers of a given physical resource are
> > tracked. This is feasible because the physical resources we're
> > tracking are typically large.
>
> On x86 this is implemented in the pat code, and could reasonably be
> generalized to be cross platform.
>
> This is controlled by HAVE_PFNMAP_TRACKING and with entry points
> like track_pfn_vma_new.
>
> Given that we already have an implementation that tracks the cached
> vs non-cached attribute using the dma api. I don't see that the
> API has to change. An implementation of the cached vs non-cached
> status for arm and other architectures is probably appropriate.
>
> It is definitely true that getting your mapping caching attributes
> out of sync can be a problem.
Sure, but we're still stuck with needing lots of scatterlist list
elements and needing to copy them to share physical buffers.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists