Re: [PATCH] workqueue: Add basic tracepoints to track workqueue execution

From: Tejun Heo
Date: Mon Aug 23 2010 - 05:51:35 EST


Hello,

On 08/22/2010 06:01 AM, Frederic Weisbecker wrote:
> On Sat, Aug 21, 2010 at 01:14:02PM -0700, Arjan van de Ven wrote:
>>
>> From: Arjan van de Ven <arjan@xxxxxxxxxxxxxxx>
>> Date: Sat, 21 Aug 2010 13:07:26 -0700
>> Subject: [PATCH] workqueue: Add basic tracepoints to track workqueue execution
>>
>> With the introduction of the new unified work queue thread pools,
>> we lost one feature: It's no longer possible to know which worker
>> is causing the CPU to wake out of idle. The result is that PowerTOP
>> now reports a lot of "kworker/a:b" instead of more readable results.
>>
>> This patch adds a pair of tracepoints to the new workqueue code,
>> similar in style to the timer/hrtimer tracepoints.
>>
>> With this pair of tracepoints, the next PowerTOP can correctly
>> report which work item caused the wakeup (and how long it took):
>>
>> Interrupt (43) i915 time 3.51ms wakeups 141
>> Work ieee80211_iface_work time 0.81ms wakeups 29
>> Work do_dbs_timer time 0.55ms wakeups 24
>> Process Xorg time 21.36ms wakeups 4
>> Timer sched_rt_period_timer time 0.01ms wakeups 1
>>
>> Signed-off-by: Arjan van de Ven <arjan@xxxxxxxxxxxxxxx>
>
> Ok, Linus applied it. That answers my doubts about the
> route for this patch :)

I was planning to work on wq tracing in this devel cycle but yeah
Arjan's patch seems like a good starting place.

We definitely need more tracing points tho. Also, David was wondering
whether it would be possible to have simple file based interface to
monitor the current status of workers. That's doable w/ tracing API,
right?

Thanks.

--
tejun
--
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/