From: Mike Travis <travis@sgi.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] sched: remove another cpumask_t variable from stack
Date: Tue, 15 Apr 2008 16:35:52 -0700 [thread overview]
Message-ID: <20080415233552.150535000@polaris-admin.engr.sgi.com> (raw)
In-Reply-To: <20080415233551.964024000@polaris-admin.engr.sgi.com>
[-- Attachment #1: cpumask_in_sched --]
[-- Type: text/plain, Size: 1910 bytes --]
* Remove another cpumask_t variable from stack that was missed in the
last kernel_sched_c updates.
Based on:
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
+ x86/latest .../x86/linux-2.6-x86.git
+ sched-devel/latest .../mingo/linux-2.6-sched-devel.git
Signed-off-by: Mike Travis <travis@sgi.com>
---
kernel/sched.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
--- linux-2.6.x86.sched.orig/kernel/sched.c
+++ linux-2.6.x86.sched/kernel/sched.c
@@ -6539,27 +6539,24 @@ static int find_next_best_node(int node,
* should be one that prevents unnecessary balancing, but also spreads tasks
* out optimally.
*/
-static cpumask_t sched_domain_node_span(int node)
+static void sched_domain_node_span(int node, cpumask_t *span)
{
nodemask_t used_nodes;
- cpumask_t span;
node_to_cpumask_ptr(nodemask, node);
int i;
- cpus_clear(span);
+ cpus_clear(*span);
nodes_clear(used_nodes);
- cpus_or(span, span, *nodemask);
+ cpus_or(*span, *span, *nodemask);
node_set(node, used_nodes);
for (i = 1; i < SD_NODES_PER_DOMAIN; i++) {
int next_node = find_next_best_node(node, &used_nodes);
node_to_cpumask_ptr_next(nodemask, next_node);
- cpus_or(span, span, *nodemask);
+ cpus_or(*span, *span, *nodemask);
}
-
- return span;
}
#endif
@@ -6921,7 +6918,7 @@ static int build_sched_domains(const cpu
sd = &per_cpu(node_domains, i);
SD_INIT(sd, NODE);
- sd->span = sched_domain_node_span(cpu_to_node(i));
+ sched_domain_node_span(cpu_to_node(i), &sd->span);
sd->parent = p;
if (p)
p->child = sd;
@@ -7036,7 +7033,7 @@ static int build_sched_domains(const cpu
continue;
}
- *domainspan = sched_domain_node_span(i);
+ sched_domain_node_span(i, domainspan);
cpus_and(*domainspan, *domainspan, *cpu_map);
sg = kmalloc_node(sizeof(struct sched_group), GFP_KERNEL, i);
--
next prev parent reply other threads:[~2008-04-15 23:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-15 23:35 [PATCH 0/2] x86: cleanup early per cpu variables/accesses v2 Mike Travis
2008-04-15 23:35 ` Mike Travis [this message]
2008-04-15 23:35 ` [PATCH 2/2] " Mike Travis
2008-04-16 9:35 ` [PATCH 0/2] " Ingo Molnar
-- strict thread matches above, loose matches on Subject: below --
2008-04-15 20:07 [PATCH 0/2] x86: cleanup early per cpu variables/accesses Mike Travis
2008-04-15 20:07 ` [PATCH 1/2] sched: remove another cpumask_t variable from stack Mike Travis
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=20080415233552.150535000@polaris-admin.engr.sgi.com \
--to=travis@sgi.com \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/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®