Thread (4 messages) 4 messages, 3 authors, 2012-08-24

Re: [PATCH v2] mm: hugetlb: add arch hook for clearing page flags before entering pool

From: Will Deacon <hidden>
Date: 2012-08-23 17:36:16
Also in: linux-mm, lkml

On Thu, Aug 23, 2012 at 06:11:56PM +0100, Michal Hocko wrote:
On Thu 23-08-12 17:37:13, Will Deacon wrote:
quoted
The core page allocator ensures that page flags are zeroed when freeing
pages via free_pages_check. A number of architectures (ARM, PPC, MIPS)
rely on this property to treat new pages as dirty with respect to the
data cache and perform the appropriate flushing before mapping the pages
into userspace.

This can lead to cache synchronisation problems when using hugepages,
since the allocator keeps its own pool of pages above the usual page
allocator and does not reset the page flags when freeing a page into
the pool.

This patch adds a new architecture hook, arch_clear_hugepage_flags, so
that architectures which rely on the page flags being in a particular
state for fresh allocations can adjust the flags accordingly when a
page is freed into the pool.

Cc: Michal Hocko <redacted>
Signed-off-by: Will Deacon <redacted>
Looks good to me
Reviewed-by: Michal Hocko <redacted>
Cheers Michal. Next step: start posting the ARM code!

Will

--
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>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help