lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 15 Oct 2015 22:10:03 +0200
From:	Luca Abeni <luca.abeni@...tn.it>
To:	Juri Lelli <juri.lelli@....com>
Cc:	linux-kernel@...r.kernel.org,
	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...hat.com>,
	Wanpeng Li <wanpeng.li@...ux.intel.com>
Subject: Re: [PATCH] Fix migration of SCHED_DEADLINE tasks

Hi Juri,

On Thu, 15 Oct 2015 17:40:19 +0100
Juri Lelli <juri.lelli@....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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ