public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Peter Zijlstra <a.p.zijlstra@chello.nl>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
	a.p.zijlstra@chello.nl, efault@gmx.de, tglx@linutronix.de,
	mingo@elte.hu
Subject: [tip:sched/urgent] sched: Mark boot-cpu active before smp_init()
Date: Wed, 16 Dec 2009 18:36:34 GMT	[thread overview]
Message-ID: <tip-933b0618d8b2a59c7a0742e43836544e02f1e9bd@git.kernel.org> (raw)
In-Reply-To: <20091216170517.423469527@chello.nl>

Commit-ID:  933b0618d8b2a59c7a0742e43836544e02f1e9bd
Gitweb:     http://git.kernel.org/tip/933b0618d8b2a59c7a0742e43836544e02f1e9bd
Author:     Peter Zijlstra <a.p.zijlstra@chello.nl>
AuthorDate: Wed, 16 Dec 2009 18:04:31 +0100
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 16 Dec 2009 19:01:53 +0100

sched: Mark boot-cpu active before smp_init()

A UP machine has 1 active cpu, not having the boot-cpu in the
active map when starting the scheduler confuses things.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
LKML-Reference: <20091216170517.423469527@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 init/main.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/init/main.c b/init/main.c
index c3db4a9..dac44a9 100644
--- a/init/main.c
+++ b/init/main.c
@@ -369,12 +369,6 @@ static void __init smp_init(void)
 {
 	unsigned int cpu;
 
-	/*
-	 * Set up the current CPU as possible to migrate to.
-	 * The other ones will be done by cpu_up/cpu_down()
-	 */
-	set_cpu_active(smp_processor_id(), true);
-
 	/* FIXME: This should be done in userspace --RR */
 	for_each_present_cpu(cpu) {
 		if (num_online_cpus() >= setup_max_cpus)
@@ -486,6 +480,7 @@ static void __init boot_cpu_init(void)
 	int cpu = smp_processor_id();
 	/* Mark the boot cpu "present", "online" etc for SMP and UP case */
 	set_cpu_online(cpu, true);
+	set_cpu_active(cpu, true);
 	set_cpu_present(cpu, true);
 	set_cpu_possible(cpu, true);
 }

  reply	other threads:[~2009-12-16 18:37 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-16 17:04 [PATCH 00/12] sched: cleanup set_task_cpu() issues Peter Zijlstra
2009-12-16 17:04 ` [PATCH 01/12] sched: Mark boot-cpu active before smp_init() Peter Zijlstra
2009-12-16 18:36   ` tip-bot for Peter Zijlstra [this message]
2009-12-16 17:04 ` [PATCH 02/12] sched: Fix set_cpu_active() in cpu_down() Peter Zijlstra
2009-12-16 17:56   ` Peter Zijlstra
2009-12-16 18:36   ` [tip:sched/urgent] " tip-bot for Xiaotian Feng
2009-12-16 17:04 ` [PATCH 03/12] sched: Fix task_hot() test order Peter Zijlstra
2009-12-16 18:37   ` [tip:sched/urgent] " tip-bot for Peter Zijlstra
2009-12-16 17:04 ` [PATCH 04/12] sched: select_task_rq_fair() must honour SD_LOAD_BALANCE Peter Zijlstra
2009-12-16 18:37   ` [tip:sched/urgent] sched: Select_task_rq_fair() " tip-bot for Peter Zijlstra
2009-12-16 17:04 ` [PATCH 05/12] sched: Use TASK_WAKING for fork wakups Peter Zijlstra
2009-12-16 18:37   ` [tip:sched/urgent] " tip-bot for Peter Zijlstra
2009-12-16 17:04 ` [PATCH 06/12] sched: Ensure set_task_cpu() is never called on blocked tasks Peter Zijlstra
2009-12-16 18:37   ` [tip:sched/urgent] " tip-bot for Peter Zijlstra
2009-12-17  5:09   ` [tip:sched/urgent] sched: Make warning less noisy tip-bot for Ingo Molnar
2009-12-16 17:04 ` [PATCH 07/12] sched: Fix sched_exec() balancing Peter Zijlstra
2009-12-16 18:38   ` [tip:sched/urgent] " tip-bot for Peter Zijlstra
2009-12-16 17:04 ` [PATCH 08/12] sched: Fix select_task_rq() vs hotplug issues Peter Zijlstra
2009-12-16 18:38   ` [tip:sched/urgent] " tip-bot for Peter Zijlstra
2009-12-16 17:04 ` [PATCH 09/12] sched: Move kthread_bind() back to kthread.c Peter Zijlstra
2009-12-16 18:38   ` [tip:sched/urgent] " tip-bot for Peter Zijlstra
2009-12-16 17:04 ` [PATCH 10/12] sched: Add pre and post wakeup hooks Peter Zijlstra
2009-12-16 18:38   ` [tip:sched/urgent] " tip-bot for Peter Zijlstra
2009-12-16 17:04 ` [PATCH 11/12] sched: Remove the cfs_rq dependency from set_task_cpu() Peter Zijlstra
2009-12-16 18:39   ` [tip:sched/urgent] " tip-bot for Peter Zijlstra
2009-12-16 17:04 ` [PATCH 12/12] sched: Simplify set_task_cpu() Peter Zijlstra
2009-12-16 18:39   ` [tip:sched/urgent] " tip-bot for Peter Zijlstra
2009-12-16 21:17 ` [PATCH 13/12] sched: remove debug check Peter Zijlstra

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=tip-933b0618d8b2a59c7a0742e43836544e02f1e9bd@git.kernel.org \
    --to=a.p.zijlstra@chello.nl \
    --cc=efault@gmx.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --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