* [KJ] [PATCH 21/39] net/ipconfig: replace schedule_timeout() with msleep()
@ 2005-01-20 23:57 Nishanth Aravamudan
2005-01-21 2:36 ` [KJ] " James Morris
0 siblings, 1 reply; 3+ messages in thread
From: Nishanth Aravamudan @ 2005-01-20 23:57 UTC (permalink / raw)
To: davem, kuznet, jmorris, yoshfuji, kaber; +Cc: netdev, kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 1609 bytes --]
Hi,
Please consider applying.
Description: Use msleep() instead of schedule_timeout() to guarantee the task
delays as expected. Change the units of the two constants to be msecs and secs
respectively.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
--- 2.6.11-rc1-kj-v/net/ipv4/ipconfig.c 2005-01-15 16:55:44.000000000 -0800
+++ 2.6.11-rc1-kj/net/ipv4/ipconfig.c 2005-01-18 13:01:44.000000000 -0800
@@ -53,6 +53,7 @@
#include <linux/seq_file.h>
#include <linux/major.h>
#include <linux/root_dev.h>
+#include <linux/delay.h>
#include <net/arp.h>
#include <net/ip.h>
#include <net/ipconfig.h>
@@ -84,8 +85,8 @@
#endif
/* Define the friendly delay before and after opening net devices */
-#define CONF_PRE_OPEN (HZ/2) /* Before opening: 1/2 second */
-#define CONF_POST_OPEN (1*HZ) /* After opening: 1 second */
+#define CONF_PRE_OPEN 500 /* Before opening: 1/2 second */
+#define CONF_POST_OPEN 1 /* After opening: 1 second */
/* Define the timeout for waiting for a DHCP/BOOTP/RARP reply */
#define CONF_OPEN_RETRIES 2 /* (Re)open devices twice */
@@ -1259,16 +1260,14 @@ static int __init ip_auto_config(void)
try_try_again:
#endif
/* Give hardware a chance to settle */
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(CONF_PRE_OPEN);
+ msleep(CONF_PRE_OPEN);
/* Setup all network devices */
if (ic_open_devs() < 0)
return -1;
/* Give drivers a chance to settle */
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(CONF_POST_OPEN);
+ ssleep(CONF_POST_OPEN);
/*
* If the config information is insufficient (e.g., our IP address or
[-- 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] 3+ messages in thread
* [KJ] Re: [PATCH 21/39] net/ipconfig: replace schedule_timeout() with msleep()
2005-01-20 23:57 [KJ] [PATCH 21/39] net/ipconfig: replace schedule_timeout() with msleep() Nishanth Aravamudan
@ 2005-01-21 2:36 ` James Morris
2005-02-09 4:37 ` David S. Miller
0 siblings, 1 reply; 3+ messages in thread
From: James Morris @ 2005-01-21 2:36 UTC (permalink / raw)
To: Nishanth Aravamudan
Cc: netdev, kernel-janitors, yoshfuji, kuznet, kaber, davem
[-- Attachment #1: Type: TEXT/PLAIN, Size: 335 bytes --]
On Thu, 20 Jan 2005, Nishanth Aravamudan wrote:
> Hi,
>
> Please consider applying.
>
> Description: Use msleep() instead of schedule_timeout() to guarantee the task
> delays as expected. Change the units of the two constants to be msecs and secs
> respectively.
Looks fine to me.
- James
--
James Morris
<jmorris@redhat.com>
[-- 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] 3+ messages in thread
* [KJ] Re: [PATCH 21/39] net/ipconfig: replace schedule_timeout() with msleep()
2005-01-21 2:36 ` [KJ] " James Morris
@ 2005-02-09 4:37 ` David S. Miller
0 siblings, 0 replies; 3+ messages in thread
From: David S. Miller @ 2005-02-09 4:37 UTC (permalink / raw)
To: James Morris; +Cc: netdev, kaber, yoshfuji, kernel-janitors, kuznet
[-- Attachment #1: Type: text/plain, Size: 429 bytes --]
On Thu, 20 Jan 2005 21:36:42 -0500 (EST)
James Morris <jmorris@redhat.com> wrote:
> On Thu, 20 Jan 2005, Nishanth Aravamudan wrote:
>
> > Hi,
> >
> > Please consider applying.
> >
> > Description: Use msleep() instead of schedule_timeout() to guarantee the task
> > delays as expected. Change the units of the two constants to be msecs and secs
> > respectively.
>
> Looks fine to me.
To me too, applied. Thanks Nishanth.
[-- 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] 3+ messages in thread
end of thread, other threads:[~2005-02-09 4:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-20 23:57 [KJ] [PATCH 21/39] net/ipconfig: replace schedule_timeout() with msleep() Nishanth Aravamudan
2005-01-21 2:36 ` [KJ] " James Morris
2005-02-09 4:37 ` 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).