From: Terence Ripperda <tripperda@nvidia.com>
To: Andi Kleen <ak@muc.de>
Cc: Terence Ripperda <tripperda@nvidia.com>,
linux-kernel@vger.kernel.org, eich@suse.de
Subject: Re: PAT support
Date: Mon, 19 Apr 2004 17:54:57 -0500 [thread overview]
Message-ID: <20040419225456.GM632@hygelac> (raw)
In-Reply-To: <20040417004217.GC72227@colin2.muc.de>
On Fri, Apr 16, 2004 at 05:42:17PM -0700, ak@muc.de wrote:
> change_page_attr can change more than just caching attributes,
> also read/write (e.g. slab debug uses it for that)
ah, ok. sorry, missed that.
> At least for the later adding another book keeping data structure
> may be too expensive.
makes sense.
> I think I prefer the do/undo model instead of push/pop.
> That can work with cmaps too. PAGE_KERNEL means no cmap,
> PAGE_KERNEL_WC and PAGE_KERNEL_NOCACHE get a cmap.
but then what is the point of cmap? I would expect a mix of WC and UC mappings to be much less dangerous than a mix of WC/UC and WB. perhaps my mindset is wrong, but it seems allowing ioremap to request a cached mapping is important, and that if that mapping was followed by ioremap_nocached or ioremap_wrcomb, that these subsequent calls should fail.
I did finish implementing your suggestion, that change_page_attr should consider PAGE_KERNEL as a call to cmap_release_range and anything else as a call to cmap_request_range. seemed to work ok, but I'm seeing the acpi table code doing a lot of ioremaps (cached) that are ignored, then iounmaps are causing cmap_release_range calls to complain about not finding the regions. of course in a final version, we'd cut out the debug output, but expecting lots of empty calls to cmap_release_range seems messy.
what if there was a restore_page_attr(unsigned long address, unsigned long numpages) that assumed the pgprot was PAGE_KERNEL. change_page_attr knows to call cmap_request_range and restore_page_attr knows to call cmap_release_range. otherwise they do the same thing, restore_ just inherently uses PAGE_KERNEL for the caching type.
> remove_vm_area() needs to just be split into some worker functions
> (__remove_vm_area et.al.)
ok, easily done.
Thanks,
Terence
next prev parent reply other threads:[~2004-04-19 22:56 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1KifY-uA-7@gated-at.bofh.it>
2004-04-13 0:01 ` PAT support Andi Kleen
2004-04-13 16:21 ` Terence Ripperda
2004-04-14 0:58 ` Andi Kleen
2004-04-16 18:07 ` Terence Ripperda
2004-04-17 0:42 ` Andi Kleen
2004-04-19 22:54 ` Terence Ripperda [this message]
2004-04-20 18:51 ` Andi Kleen
2004-04-21 23:19 ` Terence Ripperda
2004-04-22 4:21 ` Andi Kleen
2004-04-15 4:11 ` Eric W. Biederman
2004-04-15 16:38 ` Andi Kleen
2004-04-15 18:39 ` Eric W. Biederman
2004-04-15 21:38 Albert Cahalan
-- strict thread matches above, loose matches on Subject: below --
2004-04-13 5:34 Manfred Spraul
2004-04-13 14:02 ` Pavel Machek
2004-04-13 16:40 ` Terence Ripperda
2004-04-15 4:05 ` Eric W. Biederman
2004-04-12 22:29 Terence Ripperda
2004-04-13 8:36 ` Andy Whitcroft
2004-04-13 16:50 ` Terence Ripperda
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=20040419225456.GM632@hygelac \
--to=tripperda@nvidia.com \
--cc=ak@muc.de \
--cc=eich@suse.de \
--cc=linux-kernel@vger.kernel.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