lkml.org 
[lkml]   [2013]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 6/8] perf sched: Introduce timehist command
On 11/28/13, 6:58 PM, David Ahern wrote:
> On 11/28/13, 5:48 PM, Namhyung Kim wrote:
>> Do we really need to look up the callchain to find out an idle thread?
---8<---
>> It seems every idle/swapper thread for each cpu has a pid of 0.
>

I knew I had this code in there for a reason....

Older kernels (e.g., RHEL6) show init as the idle task for cpus != 0.
So, to be robust across kernel versions the idle check needs to do more
than just looking at the swapper thread as the incoming or outgoing
task. It needs to walk the first few frames of the callstack looking for
a known idle symbol.

David



\
 
 \ /
  Last update: 2013-12-04 05:41    [W:1.511 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site