From: Paul Jackson <pj@sgi.com>
To: Andrew Morton <akpm@osdl.org>
Cc: David Chinner <dgc@sgi.com>,
Simon.Derr@bull.net, linux-kernel@vger.kernel.org,
Nick Piggin <nickpiggin@yahoo.com.au>,
Christoph Lameter <clameter@sgi.com>, Paul Jackson <pj@sgi.com>
Subject: [PATCH 03/03] Cpuset: might_sleep_if check in cpuset_zones_allowed
Date: Wed, 17 May 2006 21:36:07 -0700 [thread overview]
Message-ID: <20060518043607.15898.97283.sendpatchset@jackhammer.engr.sgi.com> (raw)
In-Reply-To: <20060518043556.15898.73616.sendpatchset@jackhammer.engr.sgi.com>
From: Paul Jackson <pj@sgi.com>
It's too easy to incorrectly call cpuset_zone_allowed() in an
atomic context without __GFP_HARDWALL set, and when done, it is
not noticed until a tight memory situation forces allocations
to be tried outside the current cpuset.
Add a 'might_sleep_if()' check, to catch this earlier on, instead
of waiting for a similar check in the mutex_lock() code, which
is only rarely invoked.
Signed-off-by: Paul Jackson <pj@sgi.com>
---
kernel/cpuset.c | 1 +
1 file changed, 1 insertion(+)
--- 2.6.17-rc4-mm1.orig/kernel/cpuset.c 2006-05-17 20:31:22.577065566 -0700
+++ 2.6.17-rc4-mm1/kernel/cpuset.c 2006-05-17 20:31:36.261218192 -0700
@@ -2261,6 +2261,7 @@ int __cpuset_zone_allowed(struct zone *z
if (in_interrupt())
return 1;
node = z->zone_pgdat->node_id;
+ might_sleep_if(!(gfp_mask & __GFP_HARDWALL));
if (node_isset(node, current->mems_allowed))
return 1;
if (gfp_mask & __GFP_HARDWALL) /* If hardwall request, stop here */
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@sgi.com> 1.650.933.1373
next prev parent reply other threads:[~2006-05-18 4:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-18 4:35 [PATCH 01/03] Cpuset: might sleep checking zones allowed fix Paul Jackson
2006-05-18 4:36 ` [PATCH 02/03] Cpuset: update cpuset_zones_allowed comment Paul Jackson
2006-05-18 4:36 ` Paul Jackson [this message]
2006-05-18 5:25 ` [PATCH 01/03] Cpuset: might sleep checking zones allowed fix Andrew Morton
2006-05-18 5:47 ` David Chinner
2006-05-19 0:48 ` Paul Jackson
2006-05-19 2:21 ` David Chinner
2006-05-19 3:12 ` Paul Jackson
2006-05-19 8:54 ` David Chinner
2006-05-19 0:58 ` Paul Jackson
2006-05-19 1:10 ` Christoph Lameter
2006-05-19 1:26 ` Paul Jackson
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=20060518043607.15898.97283.sendpatchset@jackhammer.engr.sgi.com \
--to=pj@sgi.com \
--cc=Simon.Derr@bull.net \
--cc=akpm@osdl.org \
--cc=clameter@sgi.com \
--cc=dgc@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nickpiggin@yahoo.com.au \
/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
Powered by JetHome