ppc64/rtasd: replace schedule_timeout() with
PATCH 18/21 ppc64/rtasd: replace schedule_timeout() with
Hi,
Please consider applying.
Description: Replace schedule_timeout() with msleep()/ssleep(). In both cases, the current code sleeps in TASK_INTERRUPTIBLE but does not account for early wakeups due to signals being caught; therefore I have used TASK_UNINTERRUPTIBLE sleeps in both cases. The second sleep is slightly more difficult to convert as rtas_event_scan_rate is variable. I have left it as a msleep() call, although ssleep() may be more appropriate.
Signed-off-by Nishanth Aravamudan <[email protected]>
arch/ppc64/kernel/rtasd.c +3 -4
@@ -19,6 +19,7 @@#include <linux/vmalloc.h> #include <linux/spinlock.h> #include <linux/cpu.h> +#include <linux/delay.h> #include <asm/uaccess.h> #include <asm/io.h>
@@ -444,8 +445,7 @@ static int rtasd(void *unused)DEBUG ("watchdog scheduled on cpu %d\n" ,smp_processor_id ());do_event_scan (event_scan); -set_current_state (TASK_INTERRUPTIBLE ); -schedule_timeout (HZ ); +ssleep (1 ); }unlock_cpu_hotplug ();
@@ -466,8 +466,7 @@ static int rtasd(void *unused)* one second since some machines have problems if we * call event-scan too quickly). */ unlock_cpu_hotplug (); -set_current_state (TASK_INTERRUPTIBLE ); -schedule_timeout ((HZ *60 /rtas_event_scan_rate) /2 ); +msleep (30000 /rtas_event_scan_rate);lock_cpu_hotplug (); cpu =next_cpu (cpu, cpu_online_map);
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors