lkml.org 
[lkml]   [2008]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] Performance Counters for Linux, v3
On Fri, Dec 12, 2008 at 8:45 PM, Chris Friesen <cfriesen@nortel.com> wrote:
> stephane eranian wrote:
>
>> What happens in the following test case:
>>
>> - 2-way system (cpu0, cpu1)
>>
>> - on cpu0, two processes P1, P2, each self-monitoring and counting event
>> E1.
>> Event E1 can only be measured on counter C1.
>>
>> - on cpu1, there is a cpu-wide session, monitoring event E1, thus using
>> C1
>>
>> - the scheduler decides to migrate P1 onto CPU1. You now have a
>> conflict on C1.
>>
>> How is this managed?
>
> Prevent the load balancer from moving P1 onto cpu1?
>
You don't want to do that.

There was a reason why the scheduler decided to move the task.
Now, because of monitoring you would change the behavior of the task
and scheduler.
Monitoring should be unintrusive. You want the task/scheduler to
behave as if no monitoring
was present otherwise what is it you are actually measuring?

Changing or forcing the affinity because of monitoring is also a bad
idea, for the same reason.


\
 
 \ /
  Last update: 2008-12-15 15:53    [W:0.098 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site