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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 24 Apr 2012 14:50:56 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Juri Lelli <juri.lelli@...il.com>, tglx@...utronix.de,
	mingo@...hat.com, cfriesen@...tel.com, oleg@...hat.com,
	fweisbec@...il.com, darren@...art.com, johan.eker@...csson.com,
	p.faure@...tech.ch, linux-kernel@...r.kernel.org,
	claudio@...dence.eu.com, michael@...rulasolutions.com,
	fchecconi@...il.com, tommaso.cucinotta@...up.it,
	nicola.manica@...i.unitn.it, luca.abeni@...tn.it,
	dhaval.giani@...il.com, hgu1972@...il.com,
	paulmck@...ux.vnet.ibm.com, raistlin@...ux.it,
	insop.song@...csson.com, liming.wang@...driver.com
Subject: Re: [PATCH 06/16] sched: SCHED_DEADLINE push and pull logic

On Tue, 2012-04-24 at 15:15 +0200, Peter Zijlstra wrote:
> On Wed, 2012-04-11 at 12:33 -0400, Steven Rostedt wrote:
> > On Fri, 2012-04-06 at 09:14 +0200, Juri Lelli wrote:
> > >  
> > > @@ -543,6 +897,9 @@ static void put_prev_task_dl(struct rq *rq, struct task_struct *p)
> > >  {
> > >  	update_curr_dl(rq);
> > >  	p->se.exec_start = 0;
> > > +
> > > +	if (on_dl_rq(&p->dl) && p->dl.nr_cpus_allowed > 1)
> > > +		enqueue_pushable_dl_task(rq, p);
> > >  }
> > 
> > Ouch! We need to fix this. This has nothing to do with your patch
> > series, but if you look at schedule():
> > 
> > 	put_prev_task(rq, prev);
> > 	next = pick_next_task(rq);
> > 
> > 
> > We put the prev task and then pick the next task. If we call schedule
> > for some reason when we don't need to really schedule, then we just
> > added and removed from the pushable rb tree the same task. That is, we
> > did the rb manipulation twice, for no good reason.
> > 
> > Not sure how to fix this. But it will require a generic change.
> 
> 
> Something like so: https://lkml.org/lkml/2012/2/16/487 ?

But it still does the same thing:

+static struct task_struct *
+pick_next_task_rt(struct rq *rq, struct task_struct *prev)
 {
-	struct task_struct *p = _pick_next_task_rt(rq);
+	struct task_struct *p;
+	struct rt_rq *rt_rq = &rq->rt;
+
+	if (!rt_rq->rt_nr_running)
+		return NULL;
+
+	if (rt_rq_throttled(rt_rq))
+		return NULL;
+
+	if (prev)
+		prev->sched_class->put_prev_task(rq, prev);
+
+	p = _pick_next_task_rt(rq);

Now if we can do the _pick_next_task_rt() before put_prev_task(), and
only do the put_prev_task() if p != prev, then that would be something.
 
-- Steve


--
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