linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Reclaim page capture v3
@ 2008-09-05 10:19 Andy Whitcroft
  2008-09-05 10:19 ` [PATCH 1/4] pull out the page pre-release and sanity check logic for reuse Andy Whitcroft
                   ` (4 more replies)
  0 siblings, 5 replies; 22+ messages in thread
From: Andy Whitcroft @ 2008-09-05 10:19 UTC (permalink / raw)
  To: linux-mm
  Cc: linux-kernel, KOSAKI Motohiro, Peter Zijlstra, Christoph Lameter,
	Rik van Riel, Mel Gorman, Andy Whitcroft

For sometime we have been looking at mechanisms for improving the availability
of larger allocations under load.  One of the options we have explored is
the capturing of pages freed under direct reclaim in order to increase the
chances of free pages coelescing before they are subject to reallocation
by racing allocators.

Following this email is a patch stack implementing page capture during
direct reclaim.  It consits of four patches.  The first two simply pull
out existing code into helpers for reuse.  The third makes buddy's use
of struct page explicit.  The fourth contains the meat of the changes,
and its leader contains a much fuller description of the feature.

This update represents a rebase to -mm and incorporates feedback from
KOSAKI Motohiro.  It also incorporates an accounting fix which was
preventing some captures.

I have done a lot of comparitive testing with and without this patch
set and in broad brush I am seeing improvements in hugepage allocations
(worst case size) success on all of my test systems.  These tests consist
of placing a constant stream of high order allocations on the system,
at varying rates.  The results for these various runs are then averaged
to give an overall improvement.

		Absolute	Effective
x86-64		2.48%		 4.58%
powerpc		5.55%		25.22%

x86-64 has a relatively small huge page size and so is always much more
effective at allocating huge pages.  Even there we get a measurable
improvement.  On powerpc the huge pages are much larger and much harder
to recover.  Here we see a full 25% increase in page recovery.

It should be noted that these are worst case testing, and very agressive
taking every possible page in the system.  It would be helpful to get
wider testing in -mm.

Against: 2.6.27-rc1-mm1

Andrew, please consider for -mm.

-apw

Changes since V2:
 - Incorporates review feedback from Christoph Lameter,
 - Incorporates review feedback from Peter Zijlstra, and
 - Checkpatch fixes.

Changes since V1:
 - Incorporates review feedback from KOSAKI Motohiro,
 - fixes up accounting when checking watermarks for captured pages,
 - rebase 2.6.27-rc1-mm1,
 - Incorporates review feedback from Mel.


Andy Whitcroft (4):
  pull out the page pre-release and sanity check logic for reuse
  pull out zone cpuset and watermark checks for reuse
  buddy: explicitly identify buddy field use in struct page
  capture pages freed during direct reclaim for allocation by the
    reclaimer

 include/linux/mm_types.h   |    4 +
 include/linux/page-flags.h |    4 +
 mm/internal.h              |    8 +-
 mm/page_alloc.c            |  263 ++++++++++++++++++++++++++++++++++++++------
 mm/vmscan.c                |  115 ++++++++++++++++----
 5 files changed, 338 insertions(+), 56 deletions(-)


^ permalink raw reply	[flat|nested] 22+ messages in thread
* [PATCH 0/4] Reclaim page capture v4
@ 2008-10-01 12:30 Andy Whitcroft
  2008-10-01 12:30 ` [PATCH 1/4] pull out the page pre-release and sanity check logic for reuse Andy Whitcroft
  0 siblings, 1 reply; 22+ messages in thread
From: Andy Whitcroft @ 2008-10-01 12:30 UTC (permalink / raw)
  To: linux-mm
  Cc: linux-kernel, KOSAKI Motohiro, Peter Zijlstra, Christoph Lameter,
	Rik van Riel, Mel Gorman, Andy Whitcroft, Nick Piggin,
	Andrew Morton

For sometime we have been looking at mechanisms for improving the availability
of larger allocations under load.  One of the options we have explored is
the capturing of pages freed under direct reclaim in order to increase the
chances of free pages coelescing before they are subject to reallocation
by racing allocators.

Following this email is a patch stack implementing page capture during
direct reclaim.  It consits of four patches.  The first two simply pull
out existing code into helpers for reuse.  The third makes buddy's use
of struct page explicit.  The fourth contains the meat of the changes,
and its leader contains a much fuller description of the feature.

This update represents a rebase to -mm and incorporates feedback from
KOSAKI Motohiro.  It also incorporates an accounting fix which was
preventing some captures.

I have done a lot of comparitive testing with and without this patch
set and in broad brush I am seeing improvements in hugepage allocations
(worst case size) success on all of my test systems.  These tests consist
of placing a constant stream of high order allocations on the system,
at varying rates.  The results for these various runs are then averaged
to give an overall improvement.

		Absolute	Effective
x86-64		2.48%		 4.58%
powerpc		5.55%		25.22%

x86-64 has a relatively small huge page size and so is always much more
effective at allocating huge pages.  Even there we get a measurable
improvement.  On powerpc the huge pages are much larger and much harder
to recover.  Here we see a full 25% increase in page recovery.

It should be noted that these are worst case testing, and very agressive
taking every possible page in the system.  It would be helpful to get
wider testing in -mm.

Against: 2.6.27-rc1-mm1

Andrew, please consider for -mm.

-apw

Changes since V3:
 - Incorporates an anon vma fix pointed out by MinChan Kim
 - switch to using a pagevec for page capture collection

Changes since V2:
 - Incorporates review feedback from Christoph Lameter,
 - Incorporates review feedback from Peter Zijlstra, and
 - Checkpatch fixes.

Changes since V1:
 - Incorporates review feedback from KOSAKI Motohiro,
 - fixes up accounting when checking watermarks for captured pages,
 - rebase 2.6.27-rc1-mm1,
 - Incorporates review feedback from Mel.


Andy Whitcroft (4):
  pull out the page pre-release and sanity check logic for reuse
  pull out zone cpuset and watermark checks for reuse
  buddy: explicitly identify buddy field use in struct page
  capture pages freed during direct reclaim for allocation by the
    reclaimer

 include/linux/mm_types.h   |    4 +
 include/linux/page-flags.h |    4 +
 include/linux/pagevec.h    |    1 +
 mm/internal.h              |    7 +-
 mm/page_alloc.c            |  265 ++++++++++++++++++++++++++++++++++++++------
 mm/vmscan.c                |  118 ++++++++++++++++----
 6 files changed, 343 insertions(+), 56 deletions(-)


^ permalink raw reply	[flat|nested] 22+ messages in thread
* [RFC PATCH 0/4] Reclaim page capture v2
@ 2008-09-03 18:44 Andy Whitcroft
  2008-09-03 18:44 ` [PATCH 1/4] pull out the page pre-release and sanity check logic for reuse Andy Whitcroft
  0 siblings, 1 reply; 22+ messages in thread
From: Andy Whitcroft @ 2008-09-03 18:44 UTC (permalink / raw)
  To: linux-mm; +Cc: linux-kernel, KOSAKI Motohiro, Mel Gorman, Andy Whitcroft

For sometime we have been looking at mechanisms for improving the availability
of larger allocations under load.  One of the options we have explored is
the capturing of pages freed under direct reclaim in order to increase the
chances of free pages coelescing before they are subject to reallocation
by racing allocators.

Following this email is a patch stack implementing page capture during
direct reclaim.  It consits of four patches.  The first two simply pull
out existing code into helpers for reuse.  The third makes buddy's use
of struct page explicit.  The fourth contains the meat of the changes,
and its leader contains a much fuller description of the feature.

This update represents a rebase to -mm and incorporates feedback from
KOSAKI Motohiro.  It also incorporates an accounting fix which was
preventing some captures.

I have done a lot of comparitive testing with and without this patch
set and in broad brush I am seeing improvements in hugepage allocations
(worst case size) success on all of my test systems.  These tests consist
of placing a constant stream of high order allocations on the system,
at varying rates.  The results for these various runs are then averaged
to give an overall improvement.

		Absolute	Effective
x86-64		2.48%		 4.58%
powerpc		5.55%		25.22%

x86-64 has a relatively small huge page size and so is always much more
effective at allocating huge pages.  Even there we get a measurable
improvement.  On powerpc the huge pages are much larger and much harder
to recover.  Here we see a full 25% increase in page recovery.

It should be noted that these are worst case testing, and very agressive
taking every possible page in the system.

Against: 2.6.27-rc1-mm1

Comments?

-apw

Changes since V1:
 - Incorporates review feedback from KOSAKI Motohiro,
 - fixes up accounting when checking watermarks for captured pages,
 - rebase 2.6.27-rc1-mm1,
 - Incorporates review feedback from Mel.

Andy Whitcroft (4):
  pull out the page pre-release and sanity check logic for reuse
  pull out zone cpuset and watermark checks for reuse
  buddy: explicitly identify buddy field use in struct page
  capture pages freed during direct reclaim for allocation by the
    reclaimer

 include/linux/mm_types.h   |    4 +
 include/linux/page-flags.h |    6 +
 mm/internal.h              |    8 ++-
 mm/page_alloc.c            |  255 ++++++++++++++++++++++++++++++++++++++------
 mm/vmscan.c                |  115 ++++++++++++++++----
 5 files changed, 332 insertions(+), 56 deletions(-)


^ permalink raw reply	[flat|nested] 22+ messages in thread
* [RFC PATCH 0/4] Reclaim page capture v1
@ 2008-07-01 17:58 Andy Whitcroft
  2008-07-01 17:58 ` [PATCH 1/4] pull out the page pre-release and sanity check logic for reuse Andy Whitcroft
  0 siblings, 1 reply; 22+ messages in thread
From: Andy Whitcroft @ 2008-07-01 17:58 UTC (permalink / raw)
  To: linux-mm; +Cc: linux-kernel, Mel Gorman, Andy Whitcroft

For sometime we have been looking at mechanisms for improving the availability
of larger allocations under load.  One of the options we have explored is
the capturing of pages freed under direct reclaim in order to increase the
chances of free pages coelescing before they are subject to reallocation
by racing allocators.

Following this email is a patch stack implementing page capture during
direct reclaim.  It consits of four patches.  The first two simply pull
out existing code into helpers for reuse.  The third makes buddy's use
of struct page explicit.  The fourth contains the meat of the changes,
and its leader contains a much fuller description of the feature.

I have done a fair amount of comparitive testing with and without
this patch set and in broad brush I am seeing improvements in hugepage
allocations (worst case size) success of the order of 5% which under
load for systems with larger hugepages represents a doubling of the number
of pages available.  Testing is still ongoing to confirm these results.

Against: 2.6.26-rc6 (with the explicit page flags patches)

Comments?

-apw

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

end of thread, other threads:[~2008-10-02  7:00 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-05 10:19 [PATCH 0/4] Reclaim page capture v3 Andy Whitcroft
2008-09-05 10:19 ` [PATCH 1/4] pull out the page pre-release and sanity check logic for reuse Andy Whitcroft
2008-09-08 14:11   ` MinChan Kim
2008-09-08 15:14     ` Andy Whitcroft
2008-09-05 10:20 ` [PATCH 2/4] pull out zone cpuset and watermark checks " Andy Whitcroft
2008-09-05 10:20 ` [PATCH 3/4] buddy: explicitly identify buddy field use in struct page Andy Whitcroft
2008-09-05 10:20 ` [PATCH 4/4] capture pages freed during direct reclaim for allocation by the reclaimer Andy Whitcroft
2008-09-08  6:08 ` [PATCH 0/4] Reclaim page capture v3 Nick Piggin
2008-09-08 11:44   ` Andy Whitcroft
2008-09-08 13:59     ` Nick Piggin
2008-09-08 16:41       ` Andy Whitcroft
2008-09-09  3:31         ` Nick Piggin
2008-09-09 16:35           ` Andy Whitcroft
2008-09-10  3:19             ` Nick Piggin
2008-09-10  6:56               ` Andy Whitcroft
2008-09-12 21:30               ` Andy Whitcroft
  -- strict thread matches above, loose matches on Subject: below --
2008-10-01 12:30 [PATCH 0/4] Reclaim page capture v4 Andy Whitcroft
2008-10-01 12:30 ` [PATCH 1/4] pull out the page pre-release and sanity check logic for reuse Andy Whitcroft
2008-10-02  7:05   ` KAMEZAWA Hiroyuki
2008-09-03 18:44 [RFC PATCH 0/4] Reclaim page capture v2 Andy Whitcroft
2008-09-03 18:44 ` [PATCH 1/4] pull out the page pre-release and sanity check logic for reuse Andy Whitcroft
2008-09-04  1:24   ` Rik van Riel
2008-09-05  1:52   ` KOSAKI Motohiro
2008-07-01 17:58 [RFC PATCH 0/4] Reclaim page capture v1 Andy Whitcroft
2008-07-01 17:58 ` [PATCH 1/4] pull out the page pre-release and sanity check logic for reuse Andy Whitcroft

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