From: Zach Pfeffer <zpfeffer@codeaurora.org>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Tim HRM <zt.tmzt@gmail.com>,
FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
ebiederm@xmission.com, 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: Tue, 20 Jul 2010 14:56:05 -0700 [thread overview]
Message-ID: <20100720215605.GB12250@codeaurora.org> (raw)
In-Reply-To: <20100720205433.GA10553@n2100.arm.linux.org.uk>
On Tue, Jul 20, 2010 at 09:54:33PM +0100, Russell King - ARM Linux wrote:
> On Tue, Jul 20, 2010 at 01:45:17PM -0700, Zach Pfeffer wrote:
> > You can also conflict in access permissions which can and do conflict
> > (which are what multiple mappings are all about...some buffer can get
> > some access, while others get different access).
>
> Access permissions don't conflict between mappings - each mapping has
> unique access permissions.
Yes. Bad choice of words.
> > The VCM API allows the same memory to be mapped as long as it makes
> > sense and allows those attributes that can change to be specified. It
> > could be the alternative, globally applicable approach, your looking
> > for and request in your patch.
>
> I very much doubt it - there's virtually no call for creating an
> additional mapping of existing kernel memory with different permissions.
> The only time kernel memory gets remapped is with vmalloc(), where we
> want to create a virtually contiguous mapping from a collection of
> (possibly) non-contiguous pages. Such allocations are always created
> with R/W permissions.
>
> There are some cases where the vmalloc APIs are used to create mappings
> with different memory properties, but as already covered, this has become
> illegal with ARMv6 and v7 architectures.
>
> So no, VCM doesn't help because there's nothing that could be solved here.
> Creating read-only mappings is pointless, and creating mappings with
> different memory type, sharability or cache attributes is illegal.
I don't think its pointless; it may have limited utility but things
like read-only mappings can be useful.
> > Without the VCM API (or something like it) there will just be a bunch
> > of duplicated code that's basically doing ioremap. This code will
> > probably fail to configure its mappings correctly, in which case your
> > patch is a bad idea because it'll spawn bugs all over the place
> > instead of at a know location. We could instead change ioremap to
> > match the attributes of System RAM if that's what its mapping.
>
> And as I say, what is the point of creating another identical mapping to
> the one we already have?
As you say probably not much. We do still have a problem (and other
people have it as well) we need to map in large contiguous buffers
with various attributes and point the kernel and various engines at
them. This seems like something that would be globally useful. The
feedback I've gotten is that we should just keep our usage private to
our mach-msm branch.
I've got a couple of questions:
Do you think a global solution to this problem is appropriate?
What would that solution need to look like, transparent huge pages?
How should people change various mapping attributes for these large
sections of memory?
--
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-20 21:56 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
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 [this message]
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
-- strict thread matches above, loose matches on Subject: below --
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=20100720215605.GB12250@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 \
--cc=zt.tmzt@gmail.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).