Skip to content

Commit

Permalink
[PATCH] cpusets: only wakeup kswapd for zones in the current cpuset
Browse files Browse the repository at this point in the history
If we get under some memory pressure in a cpuset (we only scan zones that
are in the cpuset for memory) then kswapd is woken up for all zones.  This
patch only wakes up kswapd in zones that are part of the current cpuset.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Acked-by: Paul Jackson <pj@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Christoph Lameter authored and Linus Torvalds committed Mar 24, 2006
1 parent 95c3832 commit 0b1303f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,8 @@ __alloc_pages(gfp_t gfp_mask, unsigned int order,
goto got_pg;

do {
wakeup_kswapd(*z, order);
if (cpuset_zone_allowed(*z, gfp_mask))
wakeup_kswapd(*z, order);
} while (*(++z));

/*
Expand Down

0 comments on commit 0b1303f

Please sign in to comment.