lkml.org 
[lkml]   [2012]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] trace: reset sleep/block start time on task switch
On 1/24/12 6:27 AM, Peter Zijlstra wrote:

> Bah, you're right. Also yes your proposal is too intrusive, but that can
> be fixed, I actually did, but then I noticed its broken too, it doesn't
> matter if the schedule that schedules a task back in preempted another
> task or not, what matters is if the task we're scheduling back in was
> itself preempted or recently woken. And we simply don't know.

Yes - we'd need an extra bit in the task_struct to do this right.

> I'm tempted to revert 1ac9bc69 for now, userspace will simply have to
> correlate trace_sched_switch() and trace_sched_stat_{sleep,blocked}(),
> which shouldn't be too hard.

We tried it and it didn't work very well. Especially when used with perf
record -g. There are too many uninteresting trace_sched_switch() events.

Other possibilites: make a copy of {sleep,block}_start somewhere else in
the perf_events subsystem in the sleep/wakeup path and leave
sched_statistics untouched.

-Arun




\
 
 \ /
  Last update: 2012-01-24 22:51    [W:0.063 / U:0.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site