* [KJ] [PATCH 20/39] net/ip_vs_sync: replace schedule_timeout() with
@ 2005-01-20 23:56 ` Nishanth Aravamudan
0 siblings, 0 replies; 4+ messages in thread
From: Nishanth Aravamudan @ 2005-01-20 23:56 UTC (permalink / raw)
To: davem, kuznet, jmorris, yoshfuji, kaber; +Cc: netdev, kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 1783 bytes --]
Hi,
Please consider applying.
Description: Use ssleep() instead of schedule_timeout() to guarantee the task
delays as expected. The first two replacements use TASK_INTERRUPTIBLE but do not
check for signals, so ssleep() should be appropriate.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
--- 2.6.11-rc1-kj-v/net/ipv4/ipvs/ip_vs_sync.c 2005-01-15 16:55:44.000000000 -0800
+++ 2.6.11-rc1-kj/net/ipv4/ipvs/ip_vs_sync.c 2005-01-18 13:03:21.000000000 -0800
@@ -23,7 +23,7 @@
#include <linux/slab.h>
#include <linux/net.h>
#include <linux/completion.h>
-
+#include <linux/delay.h>
#include <linux/skbuff.h>
#include <linux/in.h>
#include <linux/igmp.h> /* for ip_mc_join_group */
@@ -647,8 +647,7 @@ static void sync_master_loop(void)
if (stop_master_sync)
break;
- __set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(HZ);
+ ssleep(1);
}
/* clean up the sync_buff queue */
@@ -705,8 +704,7 @@ static void sync_backup_loop(void)
if (stop_backup_sync)
break;
- __set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(HZ);
+ ssleep(1);
}
/* release the sending multicast socket */
@@ -818,8 +816,7 @@ static int fork_sync_thread(void *startu
if ((pid = kernel_thread(sync_thread, startup, 0)) < 0) {
IP_VS_ERR("could not create sync_thread due to %d... "
"retrying.\n", pid);
- current->state = TASK_UNINTERRUPTIBLE;
- schedule_timeout(HZ);
+ ssleep(1);
goto repeat;
}
@@ -853,8 +850,7 @@ int start_sync_thread(int state, char *m
if ((pid = kernel_thread(fork_sync_thread, &startup, 0)) < 0) {
IP_VS_ERR("could not create fork_sync_thread due to %d... "
"retrying.\n", pid);
- current->state = TASK_UNINTERRUPTIBLE;
- schedule_timeout(HZ);
+ ssleep(1);
goto repeat;
}
[-- 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
* [KJ] [PATCH 20/39] net/ip_vs_sync: replace schedule_timeout() with ssleep()
@ 2005-01-20 23:56 ` Nishanth Aravamudan
0 siblings, 0 replies; 4+ messages in thread
From: Nishanth Aravamudan @ 2005-01-20 23:56 UTC (permalink / raw)
To: davem, kuznet, jmorris, yoshfuji, kaber; +Cc: netdev, kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 1783 bytes --]
Hi,
Please consider applying.
Description: Use ssleep() instead of schedule_timeout() to guarantee the task
delays as expected. The first two replacements use TASK_INTERRUPTIBLE but do not
check for signals, so ssleep() should be appropriate.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
--- 2.6.11-rc1-kj-v/net/ipv4/ipvs/ip_vs_sync.c 2005-01-15 16:55:44.000000000 -0800
+++ 2.6.11-rc1-kj/net/ipv4/ipvs/ip_vs_sync.c 2005-01-18 13:03:21.000000000 -0800
@@ -23,7 +23,7 @@
#include <linux/slab.h>
#include <linux/net.h>
#include <linux/completion.h>
-
+#include <linux/delay.h>
#include <linux/skbuff.h>
#include <linux/in.h>
#include <linux/igmp.h> /* for ip_mc_join_group */
@@ -647,8 +647,7 @@ static void sync_master_loop(void)
if (stop_master_sync)
break;
- __set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(HZ);
+ ssleep(1);
}
/* clean up the sync_buff queue */
@@ -705,8 +704,7 @@ static void sync_backup_loop(void)
if (stop_backup_sync)
break;
- __set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(HZ);
+ ssleep(1);
}
/* release the sending multicast socket */
@@ -818,8 +816,7 @@ static int fork_sync_thread(void *startu
if ((pid = kernel_thread(sync_thread, startup, 0)) < 0) {
IP_VS_ERR("could not create sync_thread due to %d... "
"retrying.\n", pid);
- current->state = TASK_UNINTERRUPTIBLE;
- schedule_timeout(HZ);
+ ssleep(1);
goto repeat;
}
@@ -853,8 +850,7 @@ int start_sync_thread(int state, char *m
if ((pid = kernel_thread(fork_sync_thread, &startup, 0)) < 0) {
IP_VS_ERR("could not create fork_sync_thread due to %d... "
"retrying.\n", pid);
- current->state = TASK_UNINTERRUPTIBLE;
- schedule_timeout(HZ);
+ ssleep(1);
goto repeat;
}
[-- 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
* [KJ] Re: [PATCH 20/39] net/ip_vs_sync: replace schedule_timeout()
2005-01-20 23:56 ` [KJ] [PATCH 20/39] net/ip_vs_sync: replace schedule_timeout() with ssleep() Nishanth Aravamudan
@ 2005-02-09 4:35 ` David S. Miller
-1 siblings, 0 replies; 4+ messages in thread
From: David S. Miller @ 2005-02-09 4:35 UTC (permalink / raw)
To: Nishanth Aravamudan
Cc: jmorris, netdev, kaber, yoshfuji, kuznet, kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 416 bytes --]
On Thu, 20 Jan 2005 15:56:34 -0800
Nishanth Aravamudan <nacc@us.ibm.com> wrote:
> Please consider applying.
>
> Description: Use ssleep() instead of schedule_timeout() to guarantee the task
> delays as expected. The first two replacements use TASK_INTERRUPTIBLE but do not
> check for signals, so ssleep() should be appropriate.
>
> Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
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] 4+ messages in thread
* [KJ] Re: [PATCH 20/39] net/ip_vs_sync: replace schedule_timeout() with ssleep()
@ 2005-02-09 4:35 ` David S. Miller
0 siblings, 0 replies; 4+ messages in thread
From: David S. Miller @ 2005-02-09 4:35 UTC (permalink / raw)
To: Nishanth Aravamudan
Cc: jmorris, netdev, kaber, yoshfuji, kuznet, kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 416 bytes --]
On Thu, 20 Jan 2005 15:56:34 -0800
Nishanth Aravamudan <nacc@us.ibm.com> wrote:
> Please consider applying.
>
> Description: Use ssleep() instead of schedule_timeout() to guarantee the task
> delays as expected. The first two replacements use TASK_INTERRUPTIBLE but do not
> check for signals, so ssleep() should be appropriate.
>
> Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
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] 4+ messages in thread
end of thread, other threads:[~2005-02-09 4:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-20 23:56 [KJ] [PATCH 20/39] net/ip_vs_sync: replace schedule_timeout() with Nishanth Aravamudan
2005-01-20 23:56 ` [KJ] [PATCH 20/39] net/ip_vs_sync: replace schedule_timeout() with ssleep() Nishanth Aravamudan
2005-02-09 4:35 ` [KJ] Re: [PATCH 20/39] net/ip_vs_sync: replace schedule_timeout() David S. Miller
2005-02-09 4:35 ` [KJ] Re: [PATCH 20/39] net/ip_vs_sync: replace schedule_timeout() with ssleep() David S. Miller
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.