From: Nishanth Aravamudan <nacc@us.ibm.com>
To: davem@davemloft.net, kuznet@ms2.inr.ac.ru, jmorris@redhat.com,
yoshfuji@linux-ipv6.org, kaber@coreworks.de
Cc: netdev@oss.sgi.com, kernel-janitors@lists.osdl.org
Subject: [KJ] [PATCH 20/39] net/ip_vs_sync: replace schedule_timeout() with ssleep()
Date: Thu, 20 Jan 2005 15:56:34 -0800 [thread overview]
Message-ID: <20050120235634.GI2600@us.ibm.com> (raw)
[-- 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
next reply other threads:[~2005-01-20 23:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-20 23:56 Nishanth Aravamudan [this message]
2005-02-09 4:35 ` [KJ] Re: [PATCH 20/39] net/ip_vs_sync: replace schedule_timeout() with ssleep() David S. Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050120235634.GI2600@us.ibm.com \
--to=nacc@us.ibm.com \
--cc=davem@davemloft.net \
--cc=jmorris@redhat.com \
--cc=kaber@coreworks.de \
--cc=kernel-janitors@lists.osdl.org \
--cc=kuznet@ms2.inr.ac.ru \
--cc=netdev@oss.sgi.com \
--cc=yoshfuji@linux-ipv6.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).