lkml.org 
[lkml]   [2013]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: perf code using smp_processor_id() in preemptible [00000000] code
On Fri, Nov 15, 2013 at 12:51:50PM +0100, Peter Zijlstra wrote:
> ok, this will make the error go away, but what about the semantics of
> the case? Does it really matter for the grouping on which cpu we compute
> it? That is can we end up with a different group for one cpu as for
> another?
>
> Or do we simply need a coherent single cpu to do the computation with?
> In which case raw_smp_processor_id() would also suffice.
>
> If we can indeed get a different result depending on which cpu we do the
> computation, then things are broken, because it might be a task group
> we're building which has to be able to migrate around with the task.

The events are sensitive to which cpu they're scheduled to execute on
(if HT is turned on, we need to setup thread bit in register).
As far as I understand once events are assigned to cpu_hw_events
they are executing on this cpu, when tasks are migrated to another
cpu, they're re-scheduled. Or I miss something obvious here?

>
> In that case we must compute the maximal group that can be scheduled on
> all cpus.
>
> This wasn't at all clear.


\
 
 \ /
  Last update: 2013-11-15 13:41    [W:0.095 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site