* [Kernel-janitors] [PATCH 2.6.9-rc2 3/4] mtd/cfi_cmdset_0002:
@ 2004-09-20 23:58 Nishanth Aravamudan
2004-09-24 23:19 ` [Kernel-janitors] [PATCH 2.6.9-rc2 3/4] pci hotplug/pciehp: replace Nishanth Aravamudan
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Nishanth Aravamudan @ 2004-09-20 23:58 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 1020 bytes --]
Any comments would be appreciated.
Description: Use msleep() instead of schedule_timeout()
to guarantee the task delays as expected.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
--- 2.6.9-rc1-mm4-vanilla/drivers/mtd/chips/cfi_cmdset_0002.c 2004-09-09 23:05:53.000000000 -0700
+++ 2.6.9-rc1-mm4/drivers/mtd/chips/cfi_cmdset_0002.c 2004-09-10 14:16:28.000000000 -0700
@@ -1175,8 +1175,7 @@ static inline int do_erase_chip(struct m
chip->in_progress_block_addr = adr;
cfi_spin_unlock(chip->mutex);
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout((chip->erase_time*HZ)/(2*1000));
+ msleep(chip->erase_time/2);
cfi_spin_lock(chip->mutex);
timeo = jiffies + (HZ*20);
@@ -1354,8 +1353,7 @@ static inline int do_erase_oneblock(stru
chip->in_progress_block_addr = adr;
cfi_spin_unlock(chip->mutex);
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout((chip->erase_time*HZ)/(2*1000));
+ msleep(chip->erase_time/2);
cfi_spin_lock(chip->mutex);
timeo = jiffies + (HZ*20);
[-- 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] [PATCH 2.6.9-rc2 3/4] pci hotplug/pciehp: replace
2004-09-20 23:58 [Kernel-janitors] [PATCH 2.6.9-rc2 3/4] mtd/cfi_cmdset_0002: Nishanth Aravamudan
@ 2004-09-24 23:19 ` Nishanth Aravamudan
2004-09-27 17:26 ` [Kernel-janitors] [PATCH 2.6.9-rc2 3/4] sbus/bbc_i2c: replace Nishanth Aravamudan
2004-09-27 23:20 ` [Kernel-janitors] [PATCH 2.6.9-rc2 3/4] w1/w1_int: add Nishanth Aravamudan
2 siblings, 0 replies; 4+ messages in thread
From: Nishanth Aravamudan @ 2004-09-24 23:19 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 1076 bytes --]
Any comments would be appreciated.
Description: Use msleep_interruptible() instead of
schedule_timeout() to guarantee the task delays as expected.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
--- 2.6.9-rc2-vanilla/drivers/pci/hotplug/pciehp.h 2004-09-13 17:15:46.000000000 -0700
+++ 2.6.9-rc2/drivers/pci/hotplug/pciehp.h 2004-09-24 16:16:29.000000000 -0700
@@ -31,6 +31,7 @@
#include <linux/types.h>
#include <linux/pci.h>
+#include <linux/delay.h>
#include <asm/semaphore.h>
#include <asm/io.h>
#include "pci_hotplug.h"
@@ -261,14 +262,12 @@ static inline int wait_for_ctrl_irq(stru
dbg("%s : start\n", __FUNCTION__);
add_wait_queue(&ctrl->queue, &wait);
- set_current_state(TASK_INTERRUPTIBLE);
- if (!pciehp_poll_mode) {
+ if (!pciehp_poll_mode)
/* Sleep for up to 1 second */
- schedule_timeout(1*HZ);
- } else
- schedule_timeout(2.5*HZ);
+ msleep_interruptible(1000);
+ else
+ msleep_interruptible(2500);
- set_current_state(TASK_RUNNING);
remove_wait_queue(&ctrl->queue, &wait);
if (signal_pending(current))
retval = -EINTR;
[-- 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] [PATCH 2.6.9-rc2 3/4] sbus/bbc_i2c: replace
2004-09-20 23:58 [Kernel-janitors] [PATCH 2.6.9-rc2 3/4] mtd/cfi_cmdset_0002: Nishanth Aravamudan
2004-09-24 23:19 ` [Kernel-janitors] [PATCH 2.6.9-rc2 3/4] pci hotplug/pciehp: replace Nishanth Aravamudan
@ 2004-09-27 17:26 ` Nishanth Aravamudan
2004-09-27 23:20 ` [Kernel-janitors] [PATCH 2.6.9-rc2 3/4] w1/w1_int: add Nishanth Aravamudan
2 siblings, 0 replies; 4+ messages in thread
From: Nishanth Aravamudan @ 2004-09-27 17:26 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 867 bytes --]
Any comments would be appreciated.
Description: Use msleep_interruptible() instead of
schedule_timeout() to guarantee the task delays as expected. Also use
set_current_state() instead of direct assignment of current->state.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
--- 2.6.9-rc1-mm4-vanilla/drivers/sbus/char/bbc_i2c.c 2004-09-09 23:05:59.000000000 -0700
+++ 2.6.9-rc1-mm4/drivers/sbus/char/bbc_i2c.c 2004-09-10 15:42:35.000000000 -0700
@@ -189,13 +189,13 @@ static int wait_for_pin(struct bbc_i2c_b
while (limit-- > 0) {
u8 val;
- current->state = TASK_INTERRUPTIBLE;
+ set_current_state(TASK_INTERRUPTIBLE);
*status = val = readb(bp->i2c_control_regs + 0);
if ((val & I2C_PCF_PIN) == 0) {
ret = 0;
break;
}
- schedule_timeout(HZ/4);
+ msleep_interruptible(250);
}
remove_wait_queue(&bp->wq, &wait);
bp->waiting = 0;
[-- 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] [PATCH 2.6.9-rc2 3/4] w1/w1_int: add
2004-09-20 23:58 [Kernel-janitors] [PATCH 2.6.9-rc2 3/4] mtd/cfi_cmdset_0002: Nishanth Aravamudan
2004-09-24 23:19 ` [Kernel-janitors] [PATCH 2.6.9-rc2 3/4] pci hotplug/pciehp: replace Nishanth Aravamudan
2004-09-27 17:26 ` [Kernel-janitors] [PATCH 2.6.9-rc2 3/4] sbus/bbc_i2c: replace Nishanth Aravamudan
@ 2004-09-27 23:20 ` Nishanth Aravamudan
2 siblings, 0 replies; 4+ messages in thread
From: Nishanth Aravamudan @ 2004-09-27 23:20 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 707 bytes --]
Any comments would be appreciated.
Description: Inserted set_current_state() before schedule_timeout() so
the task delays as expected. Without the insertion, schedule_timeout()
will return immediately.
--- 2.6.9-rc2-vanilla/drivers/w1/w1_int.c 2004-09-13 17:16:07.000000000 -0700
+++ 2.6.9-rc2/drivers/w1/w1_int.c 2004-09-14 10:46:18.000000000 -0700
@@ -179,8 +179,10 @@ void __w1_remove_master_device(struct w1
"%s: Failed to send signal to w1 kernel thread %d.\n",
__func__, dev->kpid);
- while (atomic_read(&dev->refcnt))
+ while (atomic_read(&dev->refcnt)) {
+ set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(10);
+ }
msg.id.mst.id = dev->id;
msg.id.mst.pid = dev->kpid;
[-- 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-09-27 23:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-20 23:58 [Kernel-janitors] [PATCH 2.6.9-rc2 3/4] mtd/cfi_cmdset_0002: Nishanth Aravamudan
2004-09-24 23:19 ` [Kernel-janitors] [PATCH 2.6.9-rc2 3/4] pci hotplug/pciehp: replace Nishanth Aravamudan
2004-09-27 17:26 ` [Kernel-janitors] [PATCH 2.6.9-rc2 3/4] sbus/bbc_i2c: replace Nishanth Aravamudan
2004-09-27 23:20 ` [Kernel-janitors] [PATCH 2.6.9-rc2 3/4] w1/w1_int: add Nishanth Aravamudan
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.