From: Joel Schopp <jschopp@austin.ibm.com>
To: Nathan Lynch <ntl@pobox.com>
Cc: Andrew Morton <akpm@osdl.org>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
linuxppc64-dev@ozlabs.org, zwane@arm.linux.org.uk,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] explicitly bind idle tasks
Date: Mon, 07 Mar 2005 17:01:28 -0600 [thread overview]
Message-ID: <422CDD48.10006@austin.ibm.com> (raw)
In-Reply-To: <20050302014701.GA5897@otto>
Nathan Lynch wrote:
> With hotplug cpu and preempt, we tend to see smp_processor_id warnings
> from idle loop code because it's always checking whether its cpu has
> gone offline. Replacing every use of smp_processor_id with
> _smp_processor_id in all idle loop code is one solution; another way
> is explicitly binding idle threads to their cpus (the smp_processor_id
> warning does not fire if the caller is bound only to the calling cpu).
> This has the (admittedly slight) advantage of letting us know if an
> idle thread ever runs on the wrong cpu.
I also prefer explicitly binding idle threads to their cpus instead of
replacing use of smp_processor_id with _smp_processor_id.
>
>
> Signed-off-by: Nathan Lynch <ntl@pobox.com>
Acked-by: Joel Schopp <jschopp@austin.ibm.com>
>
> Index: linux-2.6.11-rc5-mm1/init/main.c
> ===================================================================
> --- linux-2.6.11-rc5-mm1.orig/init/main.c 2005-03-02 00:12:07.000000000 +0000
> +++ linux-2.6.11-rc5-mm1/init/main.c 2005-03-02 00:53:04.000000000 +0000
> @@ -638,6 +638,10 @@
> {
> lock_kernel();
> /*
> + * init can run on any cpu.
> + */
> + set_cpus_allowed(current, CPU_MASK_ALL);
> + /*
> * Tell the world that we're going to be the grim
> * reaper of innocent orphaned children.
> *
> Index: linux-2.6.11-rc5-mm1/kernel/sched.c
> ===================================================================
> --- linux-2.6.11-rc5-mm1.orig/kernel/sched.c 2005-03-02 00:12:07.000000000 +0000
> +++ linux-2.6.11-rc5-mm1/kernel/sched.c 2005-03-02 00:47:14.000000000 +0000
> @@ -4092,6 +4092,7 @@
> idle->array = NULL;
> idle->prio = MAX_PRIO;
> idle->state = TASK_RUNNING;
> + idle->cpus_allowed = cpumask_of_cpu(cpu);
> set_task_cpu(idle, cpu);
>
> spin_lock_irqsave(&rq->lock, flags);
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
prev parent reply other threads:[~2005-03-07 23:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-01 18:25 [PATCH] PPC64: Generic hotplug cpu support Zwane Mwaikambo
2005-02-27 11:16 ` Andrew Morton
2005-02-27 22:22 ` Benjamin Herrenschmidt
2005-02-27 22:49 ` Andrew Morton
2005-03-02 1:47 ` [PATCH] explicitly bind idle tasks Nathan Lynch
2005-03-02 3:13 ` Zwane Mwaikambo
2005-03-07 23:01 ` Joel Schopp [this message]
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=422CDD48.10006@austin.ibm.com \
--to=jschopp@austin.ibm.com \
--cc=akpm@osdl.org \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc64-dev@ozlabs.org \
--cc=ntl@pobox.com \
--cc=zwane@arm.linux.org.uk \
/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