From: Srivatsa Vaddagiri <vatsa@in.ibm.com>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Shaohua Li <shaohua.li@intel.com>,
lkml <linux-kernel@vger.kernel.org>, akpm <akpm@osdl.org>,
Ingo Molnar <mingo@elte.hu>,
Rusty Russell <rusty@rustcorp.com.au>,
ashok.raj@intel.com
Subject: Re: [PATCH]CPU hotplug breaks wake_up_new_task
Date: Tue, 31 May 2005 16:10:55 +0530 [thread overview]
Message-ID: <20050531104055.GA9908@in.ibm.com> (raw)
In-Reply-To: <429C3265.4010704@yahoo.com.au>
On Tue, May 31, 2005 at 07:46:13PM +1000, Nick Piggin wrote:
> And this patch will break balance-on-fork.
Right :-)
> How about conditionally setting task_cpu if the task's current
> CPU is offline?
Something like this?
--- kernel/fork.c.org 2005-05-31 14:57:15.000000000 +0530
+++ kernel/fork.c 2005-05-31 16:06:41.000000000 +0530
@@ -1024,7 +1024,8 @@ static task_t *copy_process(unsigned lon
* parent's CPU). This avoids alot of nasty races.
*/
p->cpus_allowed = current->cpus_allowed;
- if (unlikely(!cpu_isset(task_cpu(p), p->cpus_allowed)))
+ if (unlikely(!cpu_isset(task_cpu(p), p->cpus_allowed) ||
+ !cpu_online(task_cpu(p))))
set_task_cpu(p, smp_processor_id());
/*
--
Thanks and Regards,
Srivatsa Vaddagiri,
Linux Technology Center,
IBM Software Labs,
Bangalore, INDIA - 560017
next prev parent reply other threads:[~2005-05-31 10:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-31 7:35 [PATCH]CPU hotplug breaks wake_up_new_task Shaohua Li
2005-05-31 8:00 ` Ashok Raj
2005-05-31 8:35 ` Shaohua Li
2005-05-31 8:50 ` Nick Piggin
2005-05-31 9:11 ` Shaohua Li
2005-05-31 9:08 ` Nick Piggin
2005-05-31 9:40 ` Srivatsa Vaddagiri
2005-05-31 9:46 ` Nick Piggin
2005-05-31 10:40 ` Srivatsa Vaddagiri [this message]
2005-05-31 10:49 ` Nick Piggin
-- strict thread matches above, loose matches on Subject: below --
2005-05-31 11:41 Li, Shaohua
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=20050531104055.GA9908@in.ibm.com \
--to=vatsa@in.ibm.com \
--cc=akpm@osdl.org \
--cc=ashok.raj@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=nickpiggin@yahoo.com.au \
--cc=rusty@rustcorp.com.au \
--cc=shaohua.li@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.