Thread (38 messages) 38 messages, 4 authors, 2014-07-21

Re: [RFC PATCH 0/11] Support Write-Through mapping on x86

From: Toshi Kani <hidden>
Date: 2014-07-16 21:38:45
Also in: lkml

On Tue, 2014-07-15 at 20:40 -0400, Konrad Rzeszutek Wilk wrote:
On July 15, 2014 5:23:24 PM EDT, Toshi Kani [off-list ref] wrote:
quoted
On Tue, 2014-07-15 at 13:09 -0700, H. Peter Anvin wrote:
quoted
On 07/15/2014 12:34 PM, Toshi Kani wrote:
 :
quoted
quoted
I have given this piece of feedback at least three times now,
possibly
quoted
to different people, and I'm getting a bit grumpy about it:

We already have an issue with Xen, because Xen assigned mappings
differently and it is incompatible with the use of PAT in Linux.  As
a
quoted
result we get requests for hacks to work around this, which is
something
quoted
I really don't want to see.  I would like to see a design involving a
"reverse PAT" table where the kernel can hold the mapping between
memory
quoted
types and page table encodings (including the two different ones for
small and large pages.)
Thanks for pointing this out! (And sorry for making you repeat it three
time...)  I was not aware of the issue with Xen.  I will look into the
email archive to see what the Xen issue is, and how it can be
addressed.
https://lkml.org/lkml/2011/11/8/406
Thanks Konrad for the pointer!

Since [__]change_page_attr_set_clr() and __change_page_attr() have no
knowledge about PAT and simply work with specified PTE flags, they do
not seem to fit well with additional PAT abstraction table...

I think the root of this issue is that the kernel ignores the PAT bit.
Since __change_page_attr() only supports 4K pages, set_memory_<type>()
can set the PAT bit into the clear mask.

Attached is a patch with this approach (apply on top of this series -
not tested).  The kernel still does not support the PAT bit, but it
behaves slightly better.

Thanks,
-Toshi

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help