From: Andy Whitcroft <apw@shadowen.org>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] zone_reclaim cpus_empty needs a real variable
Date: Fri, 20 Jan 2006 13:58:45 +0000 [thread overview]
Message-ID: <20060120135845.GA8040@shadowen.org> (raw)
In-Reply-To: 20060120031555.7b6d65b7.akpm@osdl.org
zone_reclaim cpus_empty needs a real variable
On some architectures cpus_empty() attempts to take the address
of the mask. Consequently we must store the result of the
node_to_cpumask() before applying it.
Signed-off-by: Andy Whitcroft <apw@shadowen.org>
---
vmscan.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff -upN reference/mm/vmscan.c current/mm/vmscan.c
--- reference/mm/vmscan.c
+++ current/mm/vmscan.c
@@ -1836,18 +1836,21 @@ int zone_reclaim(struct zone *zone, gfp_
struct task_struct *p = current;
struct reclaim_state reclaim_state;
struct scan_control sc;
+ cpumask_t mask;
if (time_before(jiffies,
zone->last_unsuccessful_zone_reclaim + ZONE_RECLAIM_INTERVAL))
return 0;
if (!(gfp_mask & __GFP_WAIT) ||
- (!cpus_empty(node_to_cpumask(zone->zone_pgdat->node_id)) &&
- zone->zone_pgdat->node_id != numa_node_id()) ||
zone->all_unreclaimable ||
atomic_read(&zone->reclaim_in_progress) > 0)
return 0;
+ mask = node_to_cpumask(zone->zone_pgdat->node_id);
+ if (!cpus_empty(mask) && zone->zone_pgdat->node_id != numa_node_id())
+ return 0;
+
sc.may_writepage = 0;
sc.may_swap = 0;
sc.nr_scanned = 0;
next prev parent reply other threads:[~2006-01-20 13:58 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-20 11:15 2.6.16-rc1-mm2 Andrew Morton
2006-01-20 11:33 ` 2.6.16-rc1-mm2 Pekka Enberg
2006-01-20 11:40 ` 2.6.16-rc1-mm2 Andrew Morton
2006-01-20 11:56 ` 2.6.16-rc1-mm2 Pekka J Enberg
2006-01-20 15:19 ` 2.6.16-rc1-mm2 Valdis.Kletnieks
2006-01-20 13:58 ` Andy Whitcroft [this message]
2006-01-20 16:28 ` [PATCH] zone_reclaim cpus_empty needs a real variable Christoph Lameter
2006-01-20 21:34 ` Andrew Morton
2006-01-20 14:05 ` 2.6.16-rc1-mm2 Dave Jones
2006-01-20 16:23 ` Iptables error [Was: 2.6.16-rc1-mm2] Jiri Slaby
2006-01-20 16:36 ` Harald Welte
2006-01-20 16:41 ` Jiri Slaby
2006-01-20 16:43 ` Benoit Boissinot
2006-01-20 16:49 ` Linus Torvalds
2006-01-20 16:58 ` Benoit Boissinot
2006-01-20 17:38 ` Benoit Boissinot
2006-01-20 16:59 ` Jiri Slaby
2006-01-20 17:02 ` Jiri Slaby
2006-01-20 17:11 ` Carlos Silva
2006-01-20 19:32 ` Harald Welte
2006-01-20 19:46 ` Iptables error David S. Miller
2006-01-21 11:05 ` Harald Welte
2006-01-20 20:02 ` David S. Miller
2006-01-23 2:03 ` Iptables error [Was: 2.6.16-rc1-mm2] Herbert Xu
2006-01-23 2:23 ` Keith Owens
2006-01-23 20:53 ` Eric W. Biederman
2006-01-20 18:13 ` Valdis.Kletnieks
2006-01-20 19:52 ` Iptables error David S. Miller
2006-01-20 21:26 ` 2.6.16-rc1-mm2: arch/arm26/kernel/fiq.c still doesn't compile Adrian Bunk
2006-01-20 21:57 ` Alexey Dobriyan
2006-01-20 23:22 ` 2.6.16-rc1-mm2 Reuben Farrelly
2006-01-21 15:14 ` 2.6.16-rc1-mm2 Ed Tomlinson
2006-01-21 16:39 ` 2.6.16-rc1-mm2 Ed Tomlinson
2006-01-21 16:39 ` 2.6.16-rc1-mm2 Ed Tomlinson
2006-01-21 18:45 ` 2.6.16-rc1-mm2 Barry K. Nathan
2006-01-21 21:36 ` 2.6.16-rc1-mm2 Ed Tomlinson
2006-01-21 23:57 ` 2.6.16-rc1-mm2 Barry K. Nathan
2006-01-23 12:39 ` 2.6.16-rc1-mm2 Ed Tomlinson
2006-01-27 14:53 ` 2.6.16-rc1-mm2 Jeff Garzik
[not found] ` <200601280846.23279.edt@aei.ca>
2006-02-04 23:43 ` 2.6.16-rc1-mm2 (mm5 too) panics Ed Tomlinson
2006-02-24 1:57 ` 2.6.16-rc4-mm1 & " Ed Tomlinson
2006-02-24 1:57 ` Ed Tomlinson
2006-01-24 3:51 ` 2.6.16-rc1-mm2 Neil Brown
2006-01-23 18:41 ` 2.6.16-rc1-mm2 Serge E. Hallyn
2006-01-23 18:47 ` 2.6.16-rc1-mm2 Christoph Lameter
2006-01-23 19:32 ` 2.6.16-rc1-mm2 Serge E. Hallyn
2006-01-23 19:39 ` 2.6.16-rc1-mm2 Christoph Lameter
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=20060120135845.GA8040@shadowen.org \
--to=apw@shadowen.org \
--cc=akpm@osdl.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.