From: Andrew Morton <akpm@osdl.org>
To: Jens Axboe <axboe@suse.de>
Cc: linux-kernel@vger.kernel.org, rohit.seth@intel.com
Subject: Re: 2.6.15-rc1-git crashes in kswapd
Date: Thu, 17 Nov 2005 13:02:15 -0800 [thread overview]
Message-ID: <20051117130215.33889990.akpm@osdl.org> (raw)
In-Reply-To: <20051117160624.GR7787@suse.de>
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?
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)
_
next prev parent reply other threads:[~2005-11-17 21:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-17 15:47 Jens Axboe
2005-11-17 16:06 ` Jens Axboe
2005-11-17 20:35 ` Jens Axboe
2005-11-17 21:02 ` Andrew Morton [this message]
2005-11-17 23:00 ` Rohit Seth
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=20051117130215.33889990.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=axboe@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=rohit.seth@intel.com \
/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
all inboxes | Powered by JetHome®