From: Nishanth Aravamudan <nacc@us.ibm.com>
To: kernel-janitors@vger.kernel.org
Subject: [KJ] [PATCH 18/21] ppc64/rtasd: replace schedule_timeout() with
Date: Tue, 18 Jan 2005 00:18:19 +0000 [thread overview]
Message-ID: <20050118001819.GA24698@us.ibm.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1483 bytes --]
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 <nacc@us.ibm.com>
--- 2.6.11-rc1-kj-v/arch/ppc64/kernel/rtasd.c 2005-01-15 16:55:41.000000000 -0800
+++ 2.6.11-rc1-kj/arch/ppc64/kernel/rtasd.c 2005-01-15 17:28:50.000000000 -0800
@@ -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);
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
reply other threads:[~2005-01-18 0:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050118001819.GA24698@us.ibm.com \
--to=nacc@us.ibm.com \
--cc=kernel-janitors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.