All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Kirill Tkhai <ktkhai@parallels.com>
Cc: Wanpeng Li <wanpeng.li@linux.intel.com>,
	Ingo Molnar <mingo@redhat.com>, Juri Lelli <juri.lelli@arm.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH v2] sched/deadline: support dl task migration during cpu hotplug
Date: Wed, 5 Nov 2014 17:25:31 +0100	[thread overview]
Message-ID: <20141105162531.GV3337@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <1415193240.28592.14.camel@tkhai>

On Wed, Nov 05, 2014 at 04:14:00PM +0300, Kirill Tkhai wrote:
> > @@ -538,6 +539,39 @@ again:
> >  	update_rq_clock(rq);
> >  	dl_se->dl_throttled = 0;
> >  	dl_se->dl_yielded = 0;
> > +
> > +	/*
> > +	 * So if we find that the rq the task was on is no longer
> > +	 * available, we need to select a new rq.
> > +	 */
> > +	if (!rq->online) {
> > +		struct rq *later_rq = NULL;
> > +
> > +		/* We will release rq lock */
> > +		get_task_struct(p);

No need for this, due to task_dead_dl() -> hrtimer_cancel() this task
cannot go away while the timer callback is running.

> > +		raw_spin_unlock(&rq->lock);
> > +
> > +		later_rq = find_lock_later_rq(p, rq);
> > +
> > +		if (!later_rq) {
> > +			put_task_struct(p);
> > +			goto out;
> > +		}

This is wrong I think, we _must_ migrate the task, if we let it reside
on this offline rq it will never come back to us.

find_lock_later_rq() will fail for tasks that aren't currently eligible
to run. You could either try and change/parameterize it to return the
latest rq in that case, or just punt and pick any online cpu.

> isn't this too complicated?
> 
> Can't we simply queue throttled tasks in rq_offline_dl() (without clearing
> of dl_throttled() status)? migrate_tasks() will do the migration right.

We can't find these tasks, we'd have to add extra lists etc. And it
seems consistent with the normal ttwu thing, which migrates tasks when
they wake up.



      reply	other threads:[~2014-11-05 16:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-05  8:51 [RFC PATCH v2] sched/deadline: support dl task migration during cpu hotplug Wanpeng Li
2014-11-05 10:08 ` Juri Lelli
2014-11-05 10:35   ` Wanpeng Li
2014-11-05 10:50 ` Peter Zijlstra
2014-11-05 10:59   ` Wanpeng Li
2014-11-05 12:52     ` Peter Zijlstra
2014-11-06  1:46       ` Wanpeng Li
2014-11-06 10:08         ` Peter Zijlstra
2014-11-06 11:31           ` Wanpeng Li
2014-11-05 13:14 ` Kirill Tkhai
2014-11-05 16:25   ` Peter Zijlstra [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=20141105162531.GV3337@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=juri.lelli@arm.com \
    --cc=ktkhai@parallels.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=wanpeng.li@linux.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.