lkml.org 
[lkml]   [2009]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] perfcounters: Make s/w counters in a group only count when group is on
Peter Zijlstra writes:

> The former case however, you seem to say we should keep software
> counters active even though their associated task is scheduled out? That
> doesn't appear to make sense to me.
>
> Why would you want to do that?

Because the things that they are based on can get incremented when the
task is scheduled out. This is most noticeable in the case of the
context switch counter and also happens with the task migrations
counter. These *always* get incremented when the task is scheduled
out from the perf_counter subsystem's point of view, i.e. after
perf_counter_task_sched_out is called for the task and before the next
perf_counter_task_sched_in call. I believe page faults can also
happen while the task is scheduled out, via access_process_vm.

I also originally thought that software counters should only count
while their task is scheduled in, which is why I introduced the bug
that I fixed in c07c99b67233ccaad38a961c17405dc1e1542aa4. That commit
however left us with software counters that counted even when their
group wasn't on; hence the current patch.

Paul.


\
 
 \ /
  Last update: 2009-03-13 13:25    [W:0.112 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site