[lkml]   [2012]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] trace: reset sleep/block start time on task switch
On 1/25/12 12:15 PM, Steven Rostedt wrote:

> trace-cmd record -e sched_switch -f 'prev_state == 1 || prev_state == 2' -e sched_stat_sleep sleep 3
> I'm not sure the filter is even needed, and it should still keep up
> fine.

Better - I didn't see any overruns with trace-cmd.

Even if we resolve the sampling rate related problems, there is the
issue of: can we trust that a sampled sched_switch event and a sampled
sched_stat_sleep event actually match each other?

There is consensus here that touching an extra cacheline in the context
switch path is a good trade-off given the usefulness of sleep profiling
in troubleshooting latency problems.

Since it may not be a good trade-off for everyone, we just need to
figure out where to store some per-task state. To recap two potential
paths to investigate:

* store sleep_start someplace else that no one other than
sched_stat_sleeptime() knows about.

* store state in task struct that remembers whether the last context
switch was a preemption or not.


 \ /
  Last update: 2012-01-25 23:33    [W:0.102 / U:5.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site