Re: [PATCH 6/8] perf sched: Introduce timehist command

From: David Ahern
Date: Tue Dec 03 2013 - 23:16:18 EST


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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/