powerpc: Convert RTAS event scan from kernel thread to workqueue
authorAnton Blanchard <anton@samba.org>
Mon, 25 May 2009 20:25:49 +0000 (20:25 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 2 Jun 2009 00:35:32 +0000 (10:35 +1000)
commitf8729e8531cd92e892dd85a3d10669834ad0b23c
tree8e44e0dadbc7b7dc0aa1be7d68aed111cd7dcd41
parent0512a9a8e277a9de2820211eef964473b714ae65
powerpc: Convert RTAS event scan from kernel thread to workqueue

RTAS event scan has to run across all cpus. Right now we use a kernel
thread and set_cpus_allowed but in doing so we wake up the previous cpu
unnecessarily.

Some ftrace output shows this:

previous cpu (2):
[002]  7.022331: sched_switch: task swapper:0 [140] ==> rtasd:194 [120]
[002]  7.022338: sched_switch: task rtasd:194 [120] ==> migration/2:9 [0]
[002]  7.022344: sched_switch: task migration/2:9 [0] ==> swapper:0 [140]

next cpu (3):
[003]  7.022345: sched_switch: task swapper:0 [140] ==> rtasd:194 [120]
[003]  7.022371: sched_switch: task rtasd:194 [120] ==> swapper:0 [140]

We can use schedule_delayed_work_on and avoid the unnecessary wakeup.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/platforms/pseries/rtasd.c