linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* cpusets: only wakeup kswapd for zones in the current cpuset
@ 2006-02-08 18:11 Christoph Lameter
  2006-05-23  1:23 ` Paul Jackson
  0 siblings, 1 reply; 9+ messages in thread
From: Christoph Lameter @ 2006-02-08 18:11 UTC (permalink / raw)
  To: linux-kernel


---------- Forwarded message ----------
Date: Wed, 8 Feb 2006 09:45:03 -0800 (PST)
From: Christoph Lameter <clameter@engr.sgi.com>
To: akpm@osdl.org
Cc: pj@sgi.com
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 <clameter@sgi.com>

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));
 
 	/*


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

* Re: cpusets: only wakeup kswapd for zones in the current cpuset
  2006-02-08 18:11 cpusets: only wakeup kswapd for zones in the current cpuset Christoph Lameter
@ 2006-05-23  1:23 ` Paul Jackson
  2006-05-23  1:59   ` Christoph Lameter
  0 siblings, 1 reply; 9+ messages in thread
From: Paul Jackson @ 2006-05-23  1:23 UTC (permalink / raw)
  To: Christoph Lameter; +Cc: linux-kernel, Chris Wright

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 <clameter@sgi.com>
> 
> 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 <pj@sgi.com> 1.925.600.0401

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

* Re: cpusets: only wakeup kswapd for zones in the current cpuset
  2006-05-23  1:23 ` Paul Jackson
@ 2006-05-23  1:59   ` Christoph Lameter
  2006-05-23  2:22     ` Paul Jackson
  0 siblings, 1 reply; 9+ messages in thread
From: Christoph Lameter @ 2006-05-23  1:59 UTC (permalink / raw)
  To: Paul Jackson; +Cc: Christoph Lameter, linux-kernel, Chris Wright

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 <clameter@sgi.com>
> > 
> > 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.

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

* Re: cpusets: only wakeup kswapd for zones in the current cpuset
  2006-05-23  1:59   ` Christoph Lameter
@ 2006-05-23  2:22     ` Paul Jackson
  2006-05-23  2:28       ` Christoph Lameter
  0 siblings, 1 reply; 9+ messages in thread
From: Paul Jackson @ 2006-05-23  2:22 UTC (permalink / raw)
  To: Christoph Lameter; +Cc: linux-kernel, chrisw

> 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 <pj@sgi.com> 1.925.600.0401

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

* Re: cpusets: only wakeup kswapd for zones in the current cpuset
  2006-05-23  2:22     ` Paul Jackson
@ 2006-05-23  2:28       ` Christoph Lameter
  2006-05-23  6:35         ` [PATCH] cpuset: remove extra cpuset_zone_allowed check in __alloc_pages Chris Wright
  0 siblings, 1 reply; 9+ messages in thread
From: Christoph Lameter @ 2006-05-23  2:28 UTC (permalink / raw)
  To: Paul Jackson; +Cc: linux-kernel, chrisw

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.

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

* [PATCH] cpuset: remove extra cpuset_zone_allowed check in __alloc_pages
  2006-05-23  2:28       ` Christoph Lameter
@ 2006-05-23  6:35         ` Chris Wright
  2006-05-23  6:35           ` Paul Jackson
  2006-05-23 16:29           ` Christoph Lameter
  0 siblings, 2 replies; 9+ messages in thread
From: Chris Wright @ 2006-05-23  6:35 UTC (permalink / raw)
  To: akpm; +Cc: Paul Jackson, chrisw, Christoph Lameter, linux-kernel

This is redundant with check in wakeup_kswapd.

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
 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));
 
 	/*

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

* Re: [PATCH] cpuset: remove extra cpuset_zone_allowed check in __alloc_pages
  2006-05-23  6:35         ` [PATCH] cpuset: remove extra cpuset_zone_allowed check in __alloc_pages Chris Wright
@ 2006-05-23  6:35           ` Paul Jackson
  2006-05-23 16:29           ` Christoph Lameter
  1 sibling, 0 replies; 9+ messages in thread
From: Paul Jackson @ 2006-05-23  6:35 UTC (permalink / raw)
  To: Chris Wright; +Cc: akpm, chrisw, clameter, linux-kernel

Thanks, Chris.

Signed-off-by: Paul Jackson <pj@sgi.com>

-- 
                  I won't rest till it's the best ...
                  Programmer, Linux Scalability
                  Paul Jackson <pj@sgi.com> 1.925.600.0401

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

* Re: [PATCH] cpuset: remove extra cpuset_zone_allowed check in __alloc_pages
  2006-05-23  6:35         ` [PATCH] cpuset: remove extra cpuset_zone_allowed check in __alloc_pages Chris Wright
  2006-05-23  6:35           ` Paul Jackson
@ 2006-05-23 16:29           ` Christoph Lameter
  2006-05-23 16:38             ` Paul Jackson
  1 sibling, 1 reply; 9+ messages in thread
From: Christoph Lameter @ 2006-05-23 16:29 UTC (permalink / raw)
  To: Chris Wright; +Cc: akpm, Paul Jackson, linux-kernel

Simply removing my patch from mm will do the same.

Ack-by: Christoph Lameter <clameter@sgi.com>.



On Mon, 22 May 2006, Chris Wright wrote:

> This is redundant with check in wakeup_kswapd.
> 
> Signed-off-by: Chris Wright <chrisw@sous-sol.org>
> ---
>  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));
>  
>  	/*
> 

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

* Re: [PATCH] cpuset: remove extra cpuset_zone_allowed check in __alloc_pages
  2006-05-23 16:29           ` Christoph Lameter
@ 2006-05-23 16:38             ` Paul Jackson
  0 siblings, 0 replies; 9+ messages in thread
From: Paul Jackson @ 2006-05-23 16:38 UTC (permalink / raw)
  To: Christoph Lameter; +Cc: chrisw, akpm, linux-kernel

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 <clameter@engr.sgi.com>
    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 <pj@sgi.com> 1.925.600.0401

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

end of thread, other threads:[~2006-05-23 16:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-08 18:11 cpusets: only wakeup kswapd for zones in the current cpuset Christoph Lameter
2006-05-23  1:23 ` Paul Jackson
2006-05-23  1:59   ` Christoph Lameter
2006-05-23  2:22     ` Paul Jackson
2006-05-23  2:28       ` Christoph Lameter
2006-05-23  6:35         ` [PATCH] cpuset: remove extra cpuset_zone_allowed check in __alloc_pages Chris Wright
2006-05-23  6:35           ` Paul Jackson
2006-05-23 16:29           ` Christoph Lameter
2006-05-23 16:38             ` Paul Jackson

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