From: Zwane Mwaikambo <zwane@arm.linux.org.uk>
To: Nathan Lynch <ntl@pobox.com>
Cc: Andrew Morton <akpm@osdl.org>,
linux-kernel@vger.kernel.org, linuxppc64-dev@ozlabs.org
Subject: Re: [PATCH] explicitly bind idle tasks
Date: Tue, 1 Mar 2005 20:13:26 -0700 (MST) [thread overview]
Message-ID: <Pine.LNX.4.61.0503012012140.3122@montezuma.fsmlabs.com> (raw)
In-Reply-To: <20050302014701.GA5897@otto>
On Tue, 1 Mar 2005, Nathan Lynch wrote:
> On Sun, Feb 27, 2005 at 02:49:28PM -0800, Andrew Morton wrote:
> > Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> > >
> > > > - if (cpu_is_offline(smp_processor_id()) &&
> > > > + if (cpu_is_offline(_smp_processor_id()) &&
> > > > system_state == SYSTEM_RUNNING)
> > > > cpu_die();
> > > > }
> > > > _
> > >
> > > This is the idle loop. Is that ever supposed to be preempted ?
> >
> > Nope, it's a false positive. We had to do the same in x86's idle loop and
> > probably others will hit it.
>
> Perhaps I'm missing something, but is there any reason we can't do
> the following? I've tested it on ppc64, doesn't seem to break anything.
>
> 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.
Makes sense to me, for some reason i thought the smp_processor_id()
function did a cpu_rq->idle check of some sort.
Thanks,
Zwane
next prev parent reply other threads:[~2005-03-02 3:12 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 [this message]
2005-03-07 23:01 ` Joel Schopp
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=Pine.LNX.4.61.0503012012140.3122@montezuma.fsmlabs.com \
--to=zwane@arm.linux.org.uk \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc64-dev@ozlabs.org \
--cc=ntl@pobox.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 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®