[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20071214214026.GC717@linux-os.sc.intel.com>
Date: Fri, 14 Dec 2007 13:40:27 -0800
From: "Siddha, Suresh B" <suresh.b.siddha@...el.com>
To: "Eric W. Biederman" <ebiederm@...ssion.com>
Cc: Roland Dreier <rdreier@...co.com>, venkatesh.pallipadi@...el.com,
ak@....de, torvalds@...ux-foundation.org, gregkh@...e.de,
airlied@...net.ie, davej@...hat.com, mingo@...e.hu,
tglx@...utronix.de, hpa@...or.com, akpm@...ux-foundation.org,
arjan@...radead.org, jesse.barnes@...el.com,
linux-kernel@...r.kernel.org,
Suresh Siddha <suresh.b.siddha@...el.com>
Subject: Re: [RFC PATCH 06/12] PAT 64b: Add ioremap_wc support
On Thu, Dec 13, 2007 at 09:48:36PM -0700, Eric W. Biederman wrote:
> Roland Dreier <rdreier@...co.com> writes:
>
> > > > Also I didn't see anything like pgprot_wc() in the patchset (although
> >
> > > pgprot_writcombined.
> >
> > Oh I see it now (pgprot_writecombine() actually).
> >
> > However the same comment as before applies: there needs to be a
> > fallback to pgprot_noncached() for all other architectures so that
> > drivers can actually use it in a sane way.
>
> Sounds reasonable.
We will fix it in next rev.
> It should be the conflict checking that is the actual bottleneck.
> The rest is just gravy.
Yes. We are looking for comments for our proposal to track the
reserved/non-reserved regions some what different.
This is the critical issue which had been holding off PAT for years now...
<snip from the other mails>
Change x86_64 identity map to only map non-reserved memory. This helps
to handle UC/WC mapping of reserved region in a much simple manner
(we don't have to do cpa any more, as such not keep track of the actual
reference counts. We still track all the usages to keep the mappings
consistent. We just avoid the headache of splitting mattr regions for
managing ref counts for every individual usage of the reserved area).
For now, we don't track RAM pages using memattr infrastructure. This is because,
memattr infrastructure is not enough. i.e., while the page is getting
tracked using memattr infrastructure, potentially the page can get
freed(a bug that we need to catch, to avoid attribute aliasing).
For example, a driver does ioremap_uc and an application mapped the
same page using /dev/mem. When the driver does iounamp and free the page,
/dev/mem mapping is still live and we run into aliasing issue.
Can we use the existing page struct to keep track of the attribute
and usage? /dev/mem mappings then can increment the page ref count and not
allow to free the page while the /dev/mem mappings are active. And allow
/dev/mem to map only those pages which are marked reserved (which the driver
does before doing iomap).
Or when a WB mapping through /dev/mem is active, don't allow any driver
to map the page as UC.. Can we do this tracking for RAM pages through
struct page. Or there any issues we should keep in mind..
thanks,
suresh
--
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