From: Oleg Nesterov <oleg@redhat.com>
To: Tejun Heo <tj@kernel.org>
Cc: linux-kernel@vger.kernel.org, rusty@rustcorp.com.au,
sivanich@sgi.com, heiko.carstens@de.ibm.com,
torvalds@linux-foundation.org, mingo@elte.hu,
dipankar@in.ibm.com, josh@freedesktop.org,
paulmck@linux.vnet.ibm.com, akpm@linux-foundation.org,
peterz@infradead.org, arjan@infradead.org
Subject: Re: [PATCH 3/4] scheduler: replace migration_thread with cpuhog
Date: Mon, 29 Mar 2010 15:57:00 +0200 [thread overview]
Message-ID: <20100329135700.GA25423@redhat.com> (raw)
In-Reply-To: <1268815251-31407-4-git-send-email-tj@kernel.org>
As I said, personally I like these changes very much. Even if I can't ack them
I'd like to add my vote.
On 03/17, Tejun Heo wrote:
>
> int set_cpus_allowed_ptr(struct task_struct *p, const struct cpumask *new_mask)
> {
> ...
> + if (migrate_task(p, dest_cpu)) {
> + struct migration_arg arg = { p, dest_cpu };
> /* Need help from migration thread: drop lock and wait. */
> - struct task_struct *mt = rq->migration_thread;
> -
> - get_task_struct(mt);
> task_rq_unlock(rq, &flags);
> - wake_up_process(rq->migration_thread);
> - put_task_struct(mt);
> - wait_for_completion(&req.done);
> + hog_one_cpu(cpu_of(rq), migration_hog, &arg);
Afaics, this is the only change which can make a difference. If we race with
cpu_down(), set_cpus_allowed_ptr() can return before the task was actually
moved to another CPU. But this seems harmless to me.
Oleg.
next prev parent reply other threads:[~2010-03-29 13:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-17 8:40 [PATCHSET sched/core] cpuhog: implement and use cpuhog, take#2 Tejun Heo
2010-03-17 8:40 ` [PATCH 1/4] cpuhog: implement cpuhog Tejun Heo
2010-03-17 8:40 ` [PATCH 2/4] stop_machine: reimplement using cpuhog Tejun Heo
2010-03-17 8:40 ` [PATCH 3/4] scheduler: replace migration_thread with cpuhog Tejun Heo
2010-03-29 13:57 ` Oleg Nesterov [this message]
2010-03-29 14:17 ` Peter Zijlstra
2010-03-17 8:40 ` [PATCH 4/4] scheduler: kill paranoia check in synchronize_sched_expedited() Tejun Heo
-- strict thread matches above, loose matches on Subject: below --
2010-03-08 15:53 [PATCHSET] cpuhog: implement and use cpuhog Tejun Heo
2010-03-08 15:53 ` [PATCH 3/4] scheduler: replace migration_thread with cpuhog Tejun Heo
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=20100329135700.GA25423@redhat.com \
--to=oleg@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=arjan@infradead.org \
--cc=dipankar@in.ibm.com \
--cc=heiko.carstens@de.ibm.com \
--cc=josh@freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=rusty@rustcorp.com.au \
--cc=sivanich@sgi.com \
--cc=tj@kernel.org \
--cc=torvalds@linux-foundation.org \
/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;
as well as URLs for NNTP newsgroup(s).