From: Srivatsa Vaddagiri <vatsa@in.ibm.com>
To: Paul Jackson <pj@sgi.com>
Cc: dipankar@in.ibm.com, dino@in.ibm.com, ntl@pobox.com,
Andrew Morton <akpm@osdl.org>,
lse-tech@lists.sourceforge.net, akpm@osdl.org,
nickpiggin@yahoo.com.au, linux-kernel@vger.kernel.org,
rusty@rustcorp.com.au
Subject: Re: [Lse-tech] Re: [PATCH] cpusets+hotplug+preepmt broken
Date: Sat, 14 May 2005 21:39:45 +0530 [thread overview]
Message-ID: <20050514160945.GA32720@in.ibm.com> (raw)
In-Reply-To: <20050513195851.5d6665d0.pj@sgi.com>
On Fri, May 13, 2005 at 07:58:51PM -0700, Paul Jackson wrote:
> Why just in sched_setaffinity()? What about the other 60+ calls to
> set_cpus_allowed().
Most of the 60+ calls seem to be in arch-specific code. We don't bother
about arch'es which dont support CPU Hotplug. AFAIK, only ppc64, ia64
and s390 support it (as of today that is :)
> Shouldn't most of those calls be checking that the
> passed in cpus are online (holding lock_cpu_hotplug while doing all
> this)? Either that, or at least handling the error from
> set_cpus_allowed() if the requested cpus end up not being online?
Yes, if these calls can run on CPU Hotplug supported platforms.
Apart from being buggy on this count (that they don't lock_cpu_hotplug
and/or don't check return value), they will also be buggy
if any code uses set_cpus_allowed against a user-space task to
migrate to a different CPU. Something like:
old_allowed = tsk->cpus_allowed;
set_cpus_allowed(tsk, new_mask);
/* Do something */
/* Restore mask */
set_cpus_allowed(tsk, old_allowed);
This is buggy because it can race with sched_setaffinity against the same task.
Having said that, the major remaining offenders (in arch-independent code) seem
to be cpufreq, sn_hwperf, acpi, perfctr/virtual.c, attach_task :),
net/core/pktgen.c (needs to be converted over to kthread_start/stop interface).
Now how much of this actually runs on the CPU Hotplug supported platforms?
Don't know ..But it is neverthless good to fix few of these ..
In fact, some of these and other set_cpus_allowed woes were discussed here:
http://sourceforge.net/mailarchive/forum.php?thread_id=3582487&forum_id=35582
--
Thanks and Regards,
Srivatsa Vaddagiri,
Linux Technology Center,
IBM Software Labs,
Bangalore, INDIA - 560017
next prev parent reply other threads:[~2005-05-14 16:09 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-11 19:16 [PATCH] cpusets+hotplug+preepmt broken Dinakar Guniguntala
2005-05-11 19:25 ` [Lse-tech] " Paul Jackson
2005-05-11 19:55 ` Paul Jackson
2005-05-11 20:26 ` Nathan Lynch
2005-05-11 20:45 ` Paul Jackson
2005-05-11 19:51 ` Nathan Lynch
2005-05-11 20:42 ` Paul Jackson
2005-05-11 20:58 ` Paul Jackson
2005-05-14 2:23 ` Paul Jackson
2005-05-14 12:14 ` Nathan Lynch
2005-05-14 17:04 ` Paul Jackson
2005-05-14 17:44 ` Paul Jackson
2005-05-18 4:14 ` Paul Jackson
2005-05-18 9:29 ` [Lse-tech] " Dinakar Guniguntala
2005-05-18 14:48 ` Nathan Lynch
2005-05-18 21:16 ` Paul Jackson
2005-05-14 16:28 ` Srivatsa Vaddagiri
2005-05-12 15:10 ` Dinakar Guniguntala
2005-05-13 12:15 ` [Lse-tech] " Dinakar Guniguntala
2005-05-13 0:34 ` Nathan Lynch
2005-05-13 12:32 ` [Lse-tech] " Dinakar Guniguntala
2005-05-13 17:25 ` Srivatsa Vaddagiri
2005-05-13 19:59 ` Paul Jackson
2005-05-13 20:20 ` Dipankar Sarma
2005-05-13 20:46 ` Nathan Lynch
2005-05-13 21:05 ` Paul Jackson
2005-05-13 21:06 ` Dipankar Sarma
2005-05-13 20:52 ` Paul Jackson
2005-05-13 21:02 ` Dipankar Sarma
2005-05-14 2:58 ` Paul Jackson
2005-05-14 16:09 ` Srivatsa Vaddagiri [this message]
2005-05-14 17:50 ` Paul Jackson
2005-05-14 17:57 ` Paul Jackson
2005-05-14 16:30 ` Nathan Lynch
2005-05-14 17:23 ` Srivatsa Vaddagiri
2005-05-14 23:17 ` Nathan Lynch
2005-05-13 19:59 ` Paul Jackson
2005-05-13 21:27 ` Nathan Lynch
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=20050514160945.GA32720@in.ibm.com \
--to=vatsa@in.ibm.com \
--cc=akpm@osdl.org \
--cc=dino@in.ibm.com \
--cc=dipankar@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lse-tech@lists.sourceforge.net \
--cc=nickpiggin@yahoo.com.au \
--cc=ntl@pobox.com \
--cc=pj@sgi.com \
--cc=rusty@rustcorp.com.au \
/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