linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zach Pfeffer <zpfeffer@codeaurora.org>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>,
	FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
	linux-arch@vger.kernel.org, dwalker@codeaurora.org,
	mel@csn.ul.ie, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	andi@firstfloor.org, linux-omap@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [RFC 1/3 v3] mm: iommu: An API to unify IOMMU, CPU and device memory management
Date: Wed, 14 Jul 2010 22:40:51 -0700	[thread overview]
Message-ID: <20100715054050.GB3623@codeaurora.org> (raw)
In-Reply-To: <m1mxttiki1.fsf@fess.ebiederm.org>

On Wed, Jul 14, 2010 at 06:47:34PM -0700, Eric W. Biederman wrote:
> Zach Pfeffer <zpfeffer@codeaurora.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.

  reply	other threads:[~2010-07-15  5:40 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-03  5:38 [RFC 1/3 v3] mm: iommu: An API to unify IOMMU, CPU and device memory management Zach Pfeffer
2010-07-03 19:06 ` Eric W. Biederman
2010-07-07 22:44   ` Zach Pfeffer
2010-07-07 23:07     ` Russell King - ARM Linux
2010-07-08 23:59       ` Zach Pfeffer
2010-07-12  1:25         ` FUJITA Tomonori
2010-07-13  5:57           ` Zach Pfeffer
2010-07-13  6:03             ` FUJITA Tomonori
2010-07-13 12:14               ` Zach Pfeffer
2010-07-14  1:59                 ` FUJITA Tomonori
2010-07-14 20:11                   ` Zach Pfeffer
2010-07-14 22:05                     ` Russell King - ARM Linux
2010-07-15  1:29                       ` Zach Pfeffer
2010-07-15  1:47                         ` Eric W. Biederman
2010-07-15  5:40                           ` Zach Pfeffer [this message]
2010-07-15  5:35                         ` Zach Pfeffer
2010-07-15  8:55                         ` Russell King - ARM Linux
2010-07-16  0:48                           ` Tim HRM
2010-07-16  7:58                             ` Russell King - ARM Linux
2010-07-17  0:01                               ` Larry Bassel
2010-07-19  9:21                                 ` Tim HRM
2010-07-21  0:44                                   ` Zach Pfeffer
2010-07-21  1:44                                     ` Timothy Meade
2010-07-22  4:06                                       ` Zach Pfeffer
2010-07-19 17:55                               ` Michael Bohan
2010-07-19 18:40                                 ` Russell King - ARM Linux
2010-07-20 22:02                                   ` stepanm
2010-07-20 22:29                                     ` Russell King - ARM Linux
2010-07-21  5:49                                       ` Shilimkar, Santosh
2010-07-21  7:28                                         ` Russell King - ARM Linux
2010-07-21  7:45                                           ` Shilimkar, Santosh
2010-07-21 18:04                                           ` stepanm
2010-07-20 20:45                               ` Zach Pfeffer
2010-07-20 20:54                                 ` Russell King - ARM Linux
2010-07-20 21:56                                   ` Zach Pfeffer
2010-07-19  6:52                           ` Zach Pfeffer
2010-07-19  7:44                             ` Eric W. Biederman
2010-07-22  4:25                               ` Zach Pfeffer
2010-07-22  7:34                                 ` Russell King - ARM Linux
2010-07-22 16:25                                   ` Zach Pfeffer
2010-07-14 23:07                     ` FUJITA Tomonori
2010-07-15  1:41                       ` Zach Pfeffer
2010-07-19  8:22                         ` Russell King - ARM Linux
2010-07-20 10:09                           ` FUJITA Tomonori
2010-07-20 22:20                           ` Zach Pfeffer
2010-07-21  1:44                             ` FUJITA Tomonori
2010-07-22  4:30                               ` Zach Pfeffer
2010-07-22  4:43                                 ` FUJITA Tomonori
2010-07-22 16:44                                   ` Zach Pfeffer
2010-07-22  7:39                                 ` Russell King - ARM Linux
2010-07-22 16:28                                   ` Zach Pfeffer
2010-07-06 15:42 Zach Pfeffer
2010-07-21  5:18 stepanm

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=20100715054050.GB3623@codeaurora.org \
    --to=zpfeffer@codeaurora.org \
    --cc=andi@firstfloor.org \
    --cc=dwalker@codeaurora.org \
    --cc=ebiederm@xmission.com \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=linux-arch@vger.kernel.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 \
    /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).