cpusets: only wakeup kswapd for zones in the current cpuset
Subsystems (2)
---------- Forwarded message ----------
Date: Wed, 8 Feb 2006 09:45:03 -0800 (PST)
From: Christoph Lameter <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: cpusets: only wakeup kswapd for zones in the current cpuset
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.
mm/page_alloc.c +2 -1
@@ -923,7 +923,8 @@ restart: goto got_pg;do { -wakeup_kswapd (*z, order); +if (cpuset_zone_allowed (*z, gfp_mask)) +wakeup_kswapd (*z, order); }while (*(++z));/*
Quoted 13 lines · Christoph
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 <[email protected]>Index:
linux-2.6.16-rc2/mm/page_alloc.c
===================================================================
mm/page_alloc.c restart: · line 930
Quoted 9 lines
mm/page_alloc.c +2
-1@@ -923,7 +923,8 @@ restart: goto got_pg;do { -wakeup_kswapd (*z, order); +if (cpuset_zone_allowed (*z, gfp_mask)) +wakeup_kswapd (*z, order); }while (*(++z));/*
Christoph,
Does this patch serve any use? Chris Wright just noticed (in private email) that wakeup_kswapd() already contains a check for cpuset confinement, so it would seem the above added check is superfluous.
Thanks.
Signature · 3 lines
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <[email protected]> 1.925.600.0401Quoted 21 lines · Paul Jackson
Quoted 20 lines · Christoph
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 <[email protected]>Index:
linux-2.6.16-rc2/mm/page_alloc.c
===================================================================mm/page_alloc.c +2
-1@@ -923,7 +923,8 @@ restart: goto got_pg;do { -wakeup_kswapd (*z, order); +if (cpuset_zone_allowed (*z, gfp_mask)) +wakeup_kswapd (*z, order); }while (*(++z));
Quoted 8 lines
mm/page_alloc.c restart: · line 930
Quoted 2 lines
mm/page_alloc.c +0
-0/* Christoph,
Does this patch serve any use? Chris Wright just noticed (in private email) that
wakeup_kswapd()already contains a check for cpuset confinement, so it would seem the above added check is superfluous.
None if that is the case.
Quoted 1 line
None if that is the case.
Take a look at wakeup_kswapd() for yourself ;). No need to speculate.
Do you recall why you posted this patch? The wording made it sound like you had hit some problem with waking up kswapd for all the nodes.
If you really saw that, then it would seem that we still have a problem, that is now lacking a fix.
Signature · 3 lines
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <[email protected]> 1.925.600.0401Quoted 4 lines · Paul Jackson
Quoted 1 line
None if that is the case.
Take a look at
wakeup_kswapd()for yourself ;).
No need to speculate.
Yes there is a check in wakeup_kswapd(). Remove the patch. It was quite a while ago. I think I saw various functions in __alloc_pages() only being called after checking cpusets. wakeup_kswapd() did not have that check which was strange.
PATCH 1/1 cpuset: remove extra cpuset_zone_allowed check in __alloc_pages
This is redundant with check in wakeup_kswapd.
--- mm/page_alloc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
mm/page_alloc.c +1 -2
@@ -951,8 +951,7 @@ restart: goto got_pg;do { -if (cpuset_zone_allowed (*z, gfp_mask|__GFP_HARDWALL)) -wakeup_kswapd (*z, order); +wakeup_kswapd (*z, order); }while (*(++z));/*
Re: [PATCH] cpuset: remove extra cpuset_zone_allowed check in __alloc_pages
Thanks, Chris.
Signature · 3 lines
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <[email protected]> 1.925.600.0401Re: [PATCH] cpuset: remove extra cpuset_zone_allowed check in __alloc_pages
In reply to Chris WrightSimply removing my patch from mm will do the same.
Quoted 20 lines · Chris Wright
This is redundant with check in
wakeup_kswapd.Signed-off-by Chris Wright <[email protected]>--- mm/page_alloc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)mm/page_alloc.c +1
-2@@ -951,8 +951,7 @@ restart: goto got_pg;do { -if (cpuset_zone_allowed (*z, gfp_mask|__GFP_HARDWALL)) -wakeup_kswapd (*z, order); +wakeup_kswapd (*z, order); }while (*(++z));/*
Re: [PATCH] cpuset: remove extra cpuset_zone_allowed check in __alloc_pages
Quoted 1 line · Christoph
Simply removing my patch from mm will do the same.
I doubt it.
Looks to me like your patch went into Linus's tree on March 24, 2006:
changeset: 23661:1541c55e5f8d
user: Christoph Lameter <[email protected]>
date: Fri Mar 24 23:33:22 2006 +0800
summary: [PATCH] cpusets: only wakeup kswapd for zones in the current cpusetIf that's so, then only a reversing patch will suffice. Linus does not remove patches from his tree; he only adds more patches.
Signature · 3 lines
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <[email protected]> 1.925.600.0401