---------- 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.
Signed-off-by: Christoph Lameter <[email protected]>
Index: linux-2.6.16-rc2/mm/page_alloc.c
===================================================================
--- linux-2.6.16-rc2.orig/mm/page_alloc.c 2006-02-02 22:03:08.000000000 -0800
+++ linux-2.6.16-rc2/mm/page_alloc.c 2006-02-08 00:05:09.000000000 -0800
@@ -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));
/*
Three months ago, Christoph wrote:
> 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
> ===================================================================
> --- linux-2.6.16-rc2.orig/mm/page_alloc.c 2006-02-02 22:03:08.000000000 -0800
> +++ linux-2.6.16-rc2/mm/page_alloc.c 2006-02-08 00:05:09.000000000 -0800
> @@ -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.
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <[email protected]> 1.925.600.0401
On Mon, 22 May 2006, Paul Jackson wrote:
> Three months ago, Christoph wrote:
> > 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
> > ===================================================================
> > --- linux-2.6.16-rc2.orig/mm/page_alloc.c 2006-02-02 22:03:08.000000000 -0800
> > +++ linux-2.6.16-rc2/mm/page_alloc.c 2006-02-08 00:05:09.000000000 -0800
> > @@ -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.
None if that is the case.
> 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.
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <[email protected]> 1.925.600.0401
On Mon, 22 May 2006, Paul Jackson wrote:
> > 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.
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(-)
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -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));
/*
Thanks, Chris.
Signed-off-by: Paul Jackson <[email protected]>
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <[email protected]> 1.925.600.0401
Simply removing my patch from mm will do the same.
Ack-by: Christoph Lameter <[email protected]>.
On Mon, 22 May 2006, Chris Wright wrote:
> 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(-)
>
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -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));
>
> /*
>
Christoph wrote:
> 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 cpuset
If that's so, then only a reversing patch will suffice. Linus does not
remove patches from his tree; he only adds more patches.
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <[email protected]> 1.925.600.0401