net/svcsock: replace schedule_timeout() with
Subsystems (4)
PATCH 23/39 net/svcsock: replace schedule_timeout() with
Hi,
Please consider applying.
Description: Use msleep() instead of schedule_timeout() to guarantee the task delays as expected. The code, as is, is not wrong; however I see two reasons to use msleep(): 1) consistency across the kernel; and 2) milliseconds are far more human-comprehensible than jiffies.
Signed-off-by Nishanth Aravamudan <[email protected]>
net/sunrpc/svcsock.c +2 -2
@@ -32,6 +32,7 @@#include <linux/netdevice.h> #include <linux/skbuff.h> #include <linux/suspend.h> +#include <linux/delay.h> #include <net/sock.h> #include <net/checksum.h> #include <net/ip.h>
@@ -1168,8 +1169,7 @@ svc_recv(struct svc_serv *serv, struct swhile (rqstp->rq_arghi < pages) {struct page *p =alloc_page (GFP_KERNEL );if (!p) { -set_current_state (TASK_UNINTERRUPTIBLE ); -schedule_timeout (HZ /2 ); +msleep (500 );continue ; } rqstp->rq_argpages[rqstp->rq_arghi++] = p;
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors