• Anton Blanchard's avatar
    powerpc: Convert RTAS event scan from kernel thread to workqueue · f8729e85
    Anton Blanchard authored
    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: default avatarAnton Blanchard <anton@samba.org>
    Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    f8729e85
rtasd.c 12.6 KB