linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH, RFC 0/6] Avoid cache trashing on clearing huge/gigantic page
@ 2012-07-20 12:50 Kirill A. Shutemov
  2012-07-20 12:50 ` [PATCH, RFC 1/6] THP: Use real address for NUMA policy Kirill A. Shutemov
                   ` (8 more replies)
  0 siblings, 9 replies; 13+ messages in thread
From: Kirill A. Shutemov @ 2012-07-20 12:50 UTC (permalink / raw)
  To: linux-mm
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86, Andi Kleen,
	Kirill A. Shutemov, Tim Chen, Alex Shi, Jan Beulich,
	Robert Richter, Andy Lutomirski, Andrew Morton, Andrea Arcangeli,
	Johannes Weiner, Hugh Dickins, KAMEZAWA Hiroyuki, Mel Gorman,
	linux-kernel

From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>

Clearing a 2MB huge page will typically blow away several levels of CPU
caches.  To avoid this only cache clear the 4K area around the fault
address and use a cache avoiding clears for the rest of the 2MB area.

It would be nice to test the patchset with more workloads. Especially if
you see performance regression with THP.

Any feedback is appreciated.

Andi Kleen (6):
  THP: Use real address for NUMA policy
  mm: make clear_huge_page tolerate non aligned address
  THP: Pass real, not rounded, address to clear_huge_page
  x86: Add clear_page_nocache
  mm: make clear_huge_page cache clear only around the fault address
  x86: switch the 64bit uncached page clear to SSE/AVX v2

 arch/x86/include/asm/page.h          |    2 +
 arch/x86/include/asm/string_32.h     |    5 ++
 arch/x86/include/asm/string_64.h     |    5 ++
 arch/x86/lib/Makefile                |    1 +
 arch/x86/lib/clear_page_nocache_32.S |   30 +++++++++++
 arch/x86/lib/clear_page_nocache_64.S |   92 ++++++++++++++++++++++++++++++++++
 arch/x86/mm/fault.c                  |    7 +++
 mm/huge_memory.c                     |   17 +++---
 mm/memory.c                          |   29 ++++++++++-
 9 files changed, 178 insertions(+), 10 deletions(-)
 create mode 100644 arch/x86/lib/clear_page_nocache_32.S
 create mode 100644 arch/x86/lib/clear_page_nocache_64.S

-- 
1.7.7.6

--
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>

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2012-08-09 15:18 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-20 12:50 [PATCH, RFC 0/6] Avoid cache trashing on clearing huge/gigantic page Kirill A. Shutemov
2012-07-20 12:50 ` [PATCH, RFC 1/6] THP: Use real address for NUMA policy Kirill A. Shutemov
2012-07-20 12:50 ` [PATCH, RFC 2/6] mm: make clear_huge_page tolerate non aligned address Kirill A. Shutemov
2012-07-20 12:50 ` [PATCH, RFC 3/6] THP: Pass real, not rounded, address to clear_huge_page Kirill A. Shutemov
2012-07-20 12:50 ` [PATCH, RFC 4/6] x86: Add clear_page_nocache Kirill A. Shutemov
2012-07-20 12:50 ` [PATCH, RFC 5/6] mm: make clear_huge_page cache clear only around the fault address Kirill A. Shutemov
2012-07-20 12:50 ` [PATCH, RFC 6/6] x86: switch the 64bit uncached page clear to SSE/AVX v2 Kirill A. Shutemov
2012-07-23 23:30 ` [PATCH, RFC 0/6] Avoid cache trashing on clearing huge/gigantic page Andrew Morton
2012-07-24 14:09   ` Kirill A. Shutemov
2012-07-25 18:51 ` Christoph Lameter
2012-07-25 19:28   ` Andi Kleen
2012-07-25 19:38     ` Christoph Lameter
2012-08-09 15:18 ` H. Peter Anvin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).