From: Mike Travis <travis@sgi.com>
To: Tony Luck <tony.luck@intel.com>, 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/1] sched: remove unnecessary kzalloc in sched_init_smp
Date: Tue, 22 Apr 2008 10:04:26 -0700 [thread overview]
Message-ID: <480E1A9A.6070301@sgi.com> (raw)
In-Reply-To: <12c511ca0804220916i5c181202pecf8fee7153e54fc@mail.gmail.com>
Tony Luck wrote:
> On Fri, Apr 4, 2008 at 6:11 PM, Mike Travis <travis@sgi.com> wrote:
>> @@ -7297,6 +7287,11 @@ void __init sched_init_smp(void)
>> #else
>> void __init sched_init_smp(void)
>> {
>> +#if defined(CONFIG_NUMA)
>> + sched_group_nodes_bycpu = kzalloc(nr_cpu_ids * sizeof(void **),
>> + GFP_KERNEL);
>> + BUG_ON(sched_group_nodes_bycpu == NULL);
>> +#endif
>> sched_init_granularity();
>> }
>> #endif /* CONFIG_SMP */
>
> This hunk is causing problems with one of my builds (generic,
> uniprocessor). Note
> that the #else at the start of this hunk is from a #ifdef CONFIG_SMP ... so I'm
> wondering why we need #if defined(CONFIG_NUMA) inside uniprocessor code :-)
> How can you have NUMA issues with only one cpu!!!
>>> CONFIG_NUMA is dependent on CONFIG_SMP for x86 so that caused me to miss
>>> the error. But here's the fix:
* sched_group_nodes_bycpu is defined only for the SMP + NUMA case,
it should not be referenced in the !SMP + NUMA case.
For inclusion into sched-devel/latest tree.
Based on:
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
+ sched-devel/latest .../mingo/linux-2.6-sched-devel.git
Signed-off-by: Mike Travis <travis@sgi.com>
---
kernel/sched.c | 5 -----
1 file changed, 5 deletions(-)
--- linux-2.6.sched.orig/kernel/sched.c
+++ linux-2.6.sched/kernel/sched.c
@@ -8028,11 +8028,6 @@ void __init sched_init_smp(void)
#else
void __init sched_init_smp(void)
{
-#if defined(CONFIG_NUMA)
- sched_group_nodes_bycpu = kzalloc(nr_cpu_ids * sizeof(void **),
- GFP_KERNEL);
- BUG_ON(sched_group_nodes_bycpu == NULL);
-#endif
sched_init_granularity();
}
#endif /* CONFIG_SMP */
next prev parent reply other threads:[~2008-04-22 17:04 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-05 1:11 [PATCH 00/12] cpumask: reduce stack pressure from local/passed cpumask variables v3 Mike Travis
2008-04-05 1:11 ` [PATCH 01/12] x86: Convert cpumask_of_cpu macro to allocated array Mike Travis
2008-04-05 1:11 ` [PATCH 02/12] cpumask: add CPU_MASK_ALL_PTR macro Mike Travis
2008-04-05 1:11 ` [PATCH 03/12] cpumask: reduce stack pressure in cpu_coregroup_map Mike Travis
2008-04-05 1:11 ` [PATCH 04/12] sched: Remove fixed NR_CPUS sized arrays in kernel_sched_c v2 Mike Travis
2008-04-22 16:16 ` Tony Luck
2008-04-22 16:42 ` Mike Travis
2008-04-22 17:04 ` Mike Travis [this message]
2008-04-22 17:28 ` [PATCH 1/1] sched: remove unnecessary kzalloc in sched_init_smp Luck, Tony
2008-04-05 1:11 ` [PATCH 05/12] x86: use new set_cpus_allowed_ptr function Mike Travis
2008-04-05 1:11 ` [PATCH 06/12] generic: " Mike Travis
2008-04-05 1:11 ` [PATCH 07/12] cpuset: modify cpuset_set_cpus_allowed to use cpumask pointer Mike Travis
2008-04-05 1:11 ` [PATCH 08/12] generic: reduce stack pressure in sched_affinity Mike Travis
2008-04-05 1:11 ` [PATCH 09/12] numa: move large array from stack to _initdata section Mike Travis
2008-04-05 1:11 ` [PATCH 10/12] nodemask: use new node_to_cpumask_ptr function Mike Travis
2008-04-05 1:11 ` [PATCH 11/12] cpumask: reduce stack usage in SD_x_INIT initializers Mike Travis
2008-04-05 1:11 ` [PATCH 12/12] cpumask: Cleanup more uses of CPU_MASK and NODE_MASK 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=480E1A9A.6070301@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 \
--cc=tony.luck@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 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.