netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [KJ] [PATCH 19/39] net/dev: replace schedule_timeout() with msleep()
@ 2005-01-20 23:53 Nishanth Aravamudan
  2005-02-09  0:52 ` David S. Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Nishanth Aravamudan @ 2005-01-20 23:53 UTC (permalink / raw)
  To: netdev; +Cc: linux-net, kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 970 bytes --]

Hi,

Please consider applying.

Description: Use msleep() instead of schedule_timeout() to guarantee the task
delays as expected. The current code uses TASK_INTERRUPTIBLE, but does not
respond to signals, so msleep() should be ok.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>

--- 2.6.11-rc1-kj-v/net/core/dev.c	2005-01-15 16:55:44.000000000 -0800
+++ 2.6.11-rc1-kj/net/core/dev.c	2005-01-18 12:59:16.000000000 -0800
@@ -108,6 +108,7 @@
 #include <linux/kallsyms.h>
 #include <linux/netpoll.h>
 #include <linux/rcupdate.h>
+#include <linux/delay.h>
 #ifdef CONFIG_NET_RADIO
 #include <linux/wireless.h>		/* Note : will define WIRELESS_EXT */
 #include <net/iw_handler.h>
@@ -2899,8 +2900,7 @@ static void netdev_wait_allrefs(struct n
 			rebroadcast_time = jiffies;
 		}
 
-		current->state = TASK_INTERRUPTIBLE;
-		schedule_timeout(HZ / 4);
+		msleep(250);
 
 		if (time_after(jiffies, warning_time + 10 * HZ)) {
 			printk(KERN_EMERG "unregister_netdevice: "

[-- 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] 2+ messages in thread

* Re: [PATCH 19/39] net/dev: replace schedule_timeout() with msleep()
  2005-01-20 23:53 [KJ] [PATCH 19/39] net/dev: replace schedule_timeout() with msleep() Nishanth Aravamudan
@ 2005-02-09  0:52 ` David S. Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 2005-02-09  0:52 UTC (permalink / raw)
  To: Nishanth Aravamudan; +Cc: netdev, linux-net, kernel-janitors

On Thu, 20 Jan 2005 15:53:52 -0800
Nishanth Aravamudan <nacc@us.ibm.com> wrote:

> Description: Use msleep() instead of schedule_timeout() to guarantee the task
> delays as expected. The current code uses TASK_INTERRUPTIBLE, but does not
> respond to signals, so msleep() should be ok.
> 
> Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>

Applied, thanks Nishanth.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-02-09  0:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-20 23:53 [KJ] [PATCH 19/39] net/dev: replace schedule_timeout() with msleep() Nishanth Aravamudan
2005-02-09  0:52 ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).