* [Kernel-janitors] [REDIFF] Replaces yield() with schedule_timeout()
@ 2004-04-29 0:07 Gustavo Franco
2004-05-03 1:06 ` Gustavo Franco
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Gustavo Franco @ 2004-04-29 0:07 UTC (permalink / raw)
To: kernel-janitors
Hi,
I'm sending only this rediff now, if it's ok i'll send the three on my
queue.
I want to say thank you for all the suggestions.
Hope that helps,
Gustavo Franco
--- drivers/cdrom/sonycd535.c.orig 2004-04-28 20:50:46.000000000 -0300
+++ drivers/cdrom/sonycd535.c 2004-04-28 20:50:55.000000000 -0300
@@ -342,7 +342,8 @@
sony_sleep(void)
{
if (sony535_irq_used <= 0) { /* poll */
- yield();
+ set_current_state(TASK_INTERRUPTIBLE);
+ schedule_timeout(1);
} else { /* Interrupt driven */
DEFINE_WAIT(wait);
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Kernel-janitors] [REDIFF] Replaces yield() with schedule_timeout()
2004-04-29 0:07 [Kernel-janitors] [REDIFF] Replaces yield() with schedule_timeout() Gustavo Franco
@ 2004-05-03 1:06 ` Gustavo Franco
2004-05-03 1:10 ` Gustavo Franco
2004-05-03 1:24 ` [Kernel-janitors] [REDIFF] Replaces yield() with nicedelay() on Gustavo Franco
2 siblings, 0 replies; 4+ messages in thread
From: Gustavo Franco @ 2004-05-03 1:06 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 517 bytes --]
Hi,
It's the second REDIFF, and i've more two.
Hope that helps,
Gustavo Franco
--- drivers/cdrom/cdu31a.c.orig 2004-04-28 20:43:51.000000000 -0300
+++ drivers/cdrom/cdu31a.c 2004-04-28 20:44:55.000000000 -0300
@@ -386,7 +386,8 @@
unsigned long flags;
if (cdu31a_irq <= 0) {
- yield();
+ set_current_state(TASK_INTERRUPTIBLE);
+ schedule_timeout(1);
} else { /* Interrupt driven */
save_flags(flags);
[-- 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Kernel-janitors] [REDIFF] Replaces yield() with schedule_timeout()
2004-04-29 0:07 [Kernel-janitors] [REDIFF] Replaces yield() with schedule_timeout() Gustavo Franco
2004-05-03 1:06 ` Gustavo Franco
@ 2004-05-03 1:10 ` Gustavo Franco
2004-05-03 1:24 ` [Kernel-janitors] [REDIFF] Replaces yield() with nicedelay() on Gustavo Franco
2 siblings, 0 replies; 4+ messages in thread
From: Gustavo Franco @ 2004-05-03 1:10 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 587 bytes --]
Hi,
It's the third REDIFF, the last is coming...
Hope that helps,
Gustavo Franco
--- drivers/scsi/megaraid.c.orig 2004-04-28 20:46:06.000000000 -0300
+++ drivers/scsi/megaraid.c 2004-04-28 20:47:18.000000000 -0300
@@ -1691,7 +1691,8 @@
for (counter = 0; counter < 10000; counter++) {
if (!mbox->m_in.busy)
return 0;
- udelay(100); yield(1);
+ set_current_state(TASK_INTERRUPTIBLE);
+ schedule_timeout(1);
}
return -1; /* give up after 1 second */
}
[-- 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Kernel-janitors] [REDIFF] Replaces yield() with nicedelay() on
2004-04-29 0:07 [Kernel-janitors] [REDIFF] Replaces yield() with schedule_timeout() Gustavo Franco
2004-05-03 1:06 ` Gustavo Franco
2004-05-03 1:10 ` Gustavo Franco
@ 2004-05-03 1:24 ` Gustavo Franco
2 siblings, 0 replies; 4+ messages in thread
From: Gustavo Franco @ 2004-05-03 1:24 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 1090 bytes --]
Hi,
It's the last REDIFF, but i'm not replacing yield() with
schedule_timeout() because there's a nicedelay() (maybe the
usecs need to be tuned below) there:
static inline void nicedelay(unsigned long usecs)
{
current->state = TASK_INTERRUPTIBLE;
schedule_timeout(HZ);
return;
}
Hope that helps,
Gustavo Franco
--- drivers/net/sb1000.c.orig 2004-04-28 20:50:17.000000000 -0300
+++ drivers/net/sb1000.c 2004-04-28 20:49:10.000000000 -0300
@@ -271,7 +271,7 @@
timeout = jiffies + TimeOutJiffies;
while (a & 0x80 || a & 0x40) {
/* a little sleep */
- yield();
+ nicedelay(10000);
a = inb(ioaddr[0] + 7);
if (time_after_eq(jiffies, timeout)) {
@@ -295,7 +295,7 @@
timeout = jiffies + TimeOutJiffies;
while (a & 0x80 || !(a & 0x40)) {
/* a little sleep */
- yield();
+ nicedelay(10000);
a = inb(ioaddr[1] + 6);
if (time_after_eq(jiffies, timeout)) {
[-- 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-05-03 1:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-29 0:07 [Kernel-janitors] [REDIFF] Replaces yield() with schedule_timeout() Gustavo Franco
2004-05-03 1:06 ` Gustavo Franco
2004-05-03 1:10 ` Gustavo Franco
2004-05-03 1:24 ` [Kernel-janitors] [REDIFF] Replaces yield() with nicedelay() on Gustavo Franco
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.