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:	Tue, 16 Dec 2008 17:18:08 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
Cc:	Ingo Molnar <mingo@...e.hu>, Jason Baron <jbaron@...hat.com>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Steven Rostedt <srostedt@...hat.com>
Subject: Re: sched: trace: update trace_sched_wakeup()

On Tue, 2008-12-16 at 10:47 -0500, Mathieu Desnoyers wrote:
> * Peter Zijlstra (peterz@...radead.org) wrote:
> > On Tue, 2008-12-16 at 08:07 +0100, Peter Zijlstra wrote:
> > > Add the information needed to distinguish 'real' wakeups from 'false'
> > > wakeups.
> > 
> > I don't seem to be doing so well this morning...
> > 
> > Signed-off-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> > 
> > Thanks Dhaval!
> > 
> 
> Applied a modified version into the 2.6.27.9 LTTng tree. Thanks!
> (remembering that I should really move to 2.6.28-rc!)

Ingo pointed out that this generates build crap in ftrace which made me
look at the thing again, and I just realized we don't need it.

trace_sched_wakeup() gets called before we set p->state = TASK_RUNNING,
so by checking p->state in the callback we can see if its a real of
false wakeup.

The scheduler tracer in ftrace already exploits this.

> > > --- a/kernel/sched.c
> > > +++ b/kernel/sched.c
> > > @@ -2329,7 +2329,7 @@ out_activate:
> > >  	success = 1;
> > >  
> > >  out_running:
> > > -	trace_sched_wakeup(rq, p);
> > > +	trace_sched_wakeup(rq, p, success);
> > >  	check_preempt_curr(rq, p, sync);
> > >  
> > >  	p->state = TASK_RUNNING;


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