mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Luca Abeni <luca.abeni@unitn.it>
To: Juri Lelli <juri.lelli@arm.com>
Cc: linux-kernel@vger.kernel.org,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Wanpeng Li <wanpeng.li@linux.intel.com>
Subject: Re: [PATCH] Fix migration of SCHED_DEADLINE tasks
Date: Thu, 15 Oct 2015 22:10:03 +0200	[thread overview]
Message-ID: <20151015221003.3ca75275@luca-1225C> (raw)
In-Reply-To: <561FD6F3.4090209@arm.com>

Hi Juri,

On Thu, 15 Oct 2015 17:40:19 +0100
Juri Lelli <juri.lelli@arm.com> wrote:
> On 15/10/15 12:09, Luca Abeni wrote:
> > Commit 9d5142624256 ("sched/deadline: Reduce rq lock contention by
> > eliminating locking of non-feasible target") broke
[...]
> > cpu_rq(target)->dl.earliest_dl.curr))
> > +				(dl_time_before(p->dl.deadline,
> > +
> > cpu_rq(target)->dl.earliest_dl.curr) ||
> > +
> > (cpu_rq(target)->dl.earliest_dl.curr == 0)))
> 
> Can't we actually use dl.dl_nr_running here and below, so
> that we won't incur any wraparound problem?
I copied the "earliest_dl.curr == 0" check from inc_dl_deadline():
	if (dl_rq->earliest_dl.curr == 0 ||
	    dl_time_before(deadline, dl_rq->earliest_dl.curr)) {
		/*
		 * If the dl_rq had no -deadline tasks, or if the new
		   task
		 * has shorter deadline than the current one on dl_rq,
...

And init_dl_rq() has a comment saying "zero means no -deadline tasks"...
But now I see what you mean: actually, find_lock_later_rq() contains
the correct version of the check few lines below the wrong check (after
acquiring the rq lock).

Tomorrow I'll try the version of the check with 
later_rq->dl.dl_nr_running, and if it works I'll send an updated patch.



			Thanks,
				Luca

  reply	other threads:[~2015-10-15 20:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-15 11:09 Luca Abeni
2015-10-15 16:40 ` Juri Lelli
2015-10-15 20:10   ` Luca Abeni [this message]
2015-10-16  8:03   ` Luca Abeni
2015-10-16  8:51     ` Juri Lelli

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=20151015221003.3ca75275@luca-1225C \
    --to=luca.abeni@unitn.it \
    --cc=juri.lelli@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome