lkml.org 
[lkml]   [2018]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 0/3] perf/core: expose thread context switch out event type to user space
From
Date
On 23.03.2018 21:05, Peter Zijlstra wrote:
> On Thu, Mar 22, 2018 at 07:08:25PM +0300, Alexey Budankov wrote:
>>
>> Implementation of exposing context-switch-out type event as a part
>> of PERF_RECORD_SWITCH[_CPU_WIDE] record.
>>
>> Introduced types of events assumed to be:
>> a) preempt: when task->state == TASK_RUNNING
>> b) yield: !preempt, encoding is done using new bit
>> PERF_RECORD_MISC_SWITCH_OUT_YIELD like this:
>
> A !preempt context switch isn't nessecarily a yield; please don't use
> that name, it means something quite specific and this isn't it.
>
> Specifically, on Linux yield() doesn't actually change task->state, so
> when task->state is set !0 it _cannot_ have been yield.
>
> I would invert the thing and call the preempt one SWITCH_OUT_PREEMPT.
>

Make sense. This way it names the thing exactly what it is.
Let me take care of that.

Thanks,
Alexey

\
 
 \ /
  Last update: 2018-03-23 21:39    [W:0.085 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site