From: Rusty Russell <rusty@rustcorp.com.au>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: "Andrew Morton" <akpm@linux-foundation.org>,
"Frédéric Weisbecker" <fweisbec@gmail.com>,
mingo@elte.hu, linux-kernel@vger.kernel.org, oleg@redhat.com,
travis@sgi.com, a.p.zijlstra@chello.nl,
mm-commits@vger.kernel.org
Subject: Re: + work_on_cpu-rewrite-it-to-create-a-kernel-thread-on-demand.patch added to -mm tree
Date: Sat, 14 Feb 2009 07:51:15 +1030 [thread overview]
Message-ID: <200902140751.15662.rusty@rustcorp.com.au> (raw)
In-Reply-To: <m18wobcrw3.fsf@fess.ebiederm.org>
On Friday 13 February 2009 07:08:36 Eric W. Biederman wrote:
> Andrew Morton <akpm@linux-foundation.org> writes:
> >
> > Series of four patches:
> >
> > - switch cstate.c frmo work_on_cpu to smp_call_function_single()
> >
> > - ditto acpi-cpufreq.c
> >
> > - ditto mce_amd_64.c
> >
> > The final work_on_cpu() caller is pci_call_probe(). I'd like to find a
> > way of removing that callsite as well, so we can finally remove this
> > turkey but for now, just fix the bugs in it:
>
> As far as I can tell when we are doing the probes we are in a function
> that can sleep, so we should be able to just call set_cpus_allowed to
> remove the need for work_on_cpu in pci_call_probe. Possibly with a
> save/restore of the allowed cpus.
>
> Am I missing something?
Yes. This is a questionable practice when it's a kernel thread (but not
really a problem), but a definite no-no on a real process. Userspace is
allowed to change affinity on any process at any time; that's why we need
a real method to replace this meme.
(I'm also getting those cpumask's off the stack for core and x86 code, which
is why I'm hitting them all).
Thanks,
Rusty.
prev parent reply other threads:[~2009-02-13 23:41 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200902031058.n13AwOoK016719@imap1.linux-foundation.org>
2009-02-03 12:11 ` + work_on_cpu-rewrite-it-to-create-a-kernel-thread-on-demand.patch added to -mm tree Ingo Molnar
2009-02-03 16:58 ` Frédéric Weisbecker
2009-02-03 19:25 ` Andrew Morton
2009-02-04 3:58 ` Rusty Russell
2009-02-04 4:16 ` Andrew Morton
2009-02-04 10:46 ` Rusty Russell
2009-02-12 20:38 ` Eric W. Biederman
2009-02-12 20:48 ` Andrew Morton
2009-02-12 22:08 ` Eric W. Biederman
2009-02-12 22:13 ` Eric W. Biederman
2009-02-12 22:23 ` Andrew Morton
2009-02-12 23:04 ` Eric W. Biederman
2009-02-12 22:20 ` Andrew Morton
2009-02-13 21:21 ` Rusty Russell [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=200902140751.15662.rusty@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=ebiederm@xmission.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mm-commits@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=travis@sgi.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