public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rohit Seth <rohit.seth@intel.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Jens Axboe <axboe@suse.de>, linux-kernel@vger.kernel.org
Subject: Re: 2.6.15-rc1-git crashes in kswapd
Date: Thu, 17 Nov 2005 15:00:52 -0800	[thread overview]
Message-ID: <1132268452.14243.4.camel@akash.sc.intel.com> (raw)
In-Reply-To: <20051117130215.33889990.akpm@osdl.org>

On Thu, 2005-11-17 at 13:02 -0800, Andrew Morton wrote:
> Jens Axboe <axboe@suse.de> wrote:
> >
> > does zonelist->zones change further down the path
> > and we need the revalidation before after restarting?
> > 
> 
> err, yeah.   Like this, I think?
> 
> 

Good catch Jens.  The zone variables (and their initialization) got
slightly changed because we moved the zone_statistics part from
_alloc_pages to get_page_from_freelist function.

Andrew's patch below is the right fix.

-rohit
> 
> We modify local variable `z' while walking across the zones.  So we need to
> restore it if we do the `goto restart' thing in the rare case where the
> oom-killer was called.
> 
> 
> Signed-off-by: Andrew Morton <akpm@osdl.org>
> ---
> 
>  mm/page_alloc.c |    9 ++++-----
>  1 files changed, 4 insertions(+), 5 deletions(-)
> 
> diff -puN mm/page_alloc.c~alloc_pages-oops-fix mm/page_alloc.c
> --- 25/mm/page_alloc.c~alloc_pages-oops-fix	Thu Nov 17 12:58:38 2005
> +++ 25-akpm/mm/page_alloc.c	Thu Nov 17 12:59:19 2005
> @@ -845,13 +845,12 @@ __alloc_pages(gfp_t gfp_mask, unsigned i
>  
>  	might_sleep_if(wait);
>  
> -	z = zonelist->zones;  /* the list of zones suitable for gfp_mask */
> +restart:
> +	z = zonelist->zones;	  /* the list of zones suitable for gfp_mask */
>  
> -	if (unlikely(*z == NULL)) {
> -		/* Should this ever happen?? */
> +	if (unlikely(*z == NULL)) /* Should this ever happen?? */
>  		return NULL;
> -	}
> -restart:
> +
>  	page = get_page_from_freelist(gfp_mask|__GFP_HARDWALL, order,
>  				zonelist, ALLOC_CPUSET);
>  	if (page)
> _
> 


      reply	other threads:[~2005-11-17 22:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-17 15:47 2.6.15-rc1-git crashes in kswapd Jens Axboe
2005-11-17 16:06 ` Jens Axboe
2005-11-17 20:35   ` Jens Axboe
2005-11-17 21:02   ` Andrew Morton
2005-11-17 23:00     ` Rohit Seth [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1132268452.14243.4.camel@akash.sc.intel.com \
    --to=rohit.seth@intel.com \
    --cc=akpm@osdl.org \
    --cc=axboe@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox