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
Attachments
- page-ext-mask.patch [text/x-patch] 3716 bytes · preview
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,possiblyquoted
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. Asaquoted
result we get requests for hacks to work around this, which issomethingquoted
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 betweenmemoryquoted
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