[PATCH] sunrpc: replace schedule_timeout() with msleep() From: Nishanth Aravamudan 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 Signed-off-by: Domen Puncer Signed-off-by: Alexey Dobriyan Index: linux-kj/net/sunrpc/svcsock.c =================================================================== --- linux-kj.orig/net/sunrpc/svcsock.c 2005-09-03 14:19:18.000000000 +0400 +++ linux-kj/net/sunrpc/svcsock.c 2005-09-03 14:22:54.000000000 +0400 @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -1170,8 +1171,7 @@ svc_recv(struct svc_serv *serv, struct s while (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;