linux-stable/net/sunrpc
Jeff Layton 7086721f9c SUNRPC: have svc_recv() check kthread_should_stop()
When using kthreads that call into svc_recv, we want to make sure that
they do not block there for a long time when we're trying to take down
the kthread.

This patch changes svc_recv() to check kthread_should_stop() at the same
places that it checks to see if it's signalled(). Also check just before
svc_recv() tries to schedule(). By making sure that we check it just
after setting the task state we can avoid having to use any locking or
signalling to ensure it doesn't block for a long time.

There's still a chance of a 500ms sleep if alloc_page() fails, but
that should be a rare occurrence and isn't a terribly long time in
the context of a kthread being taken down.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2008-04-23 16:13:36 -04:00
..
auth_gss Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-03-18 00:37:55 -07:00
xprtrdma IB/core: Add support for "send with invalidate" work requests 2008-04-16 21:09:32 -07:00
auth.c Merge branch 'task_killable' of git://git.kernel.org/pub/scm/linux/kernel/git/willy/misc 2008-02-01 11:45:47 +11:00
auth_null.c SUNRPC: cleanup rpc credential cache garbage collection 2007-07-10 23:40:35 -04:00
auth_unix.c SUNRPC: Remove the tk_auth macro... 2007-07-10 23:40:37 -04:00
cache.c [SUNRPC]: Use proc_create() to setup ->proc_fops first 2008-02-28 14:00:59 -08:00
clnt.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-04-17 23:56:30 -07:00
Makefile svc: Add an svc transport class 2008-02-01 16:42:07 -05:00
rpc_pipe.c net: replace remaining __FUNCTION__ occurrences 2008-03-05 20:47:47 -08:00
rpcb_clnt.c net: replace remaining __FUNCTION__ occurrences 2008-03-05 20:47:47 -08:00
sched.c Merge branch 'task_killable' of git://git.kernel.org/pub/scm/linux/kernel/git/willy/misc 2008-02-01 11:45:47 +11:00
socklib.c SUNRPC: temp var should match return type of xdr_skb_read_actor 2008-01-30 02:05:43 -05:00
stats.c [SUNRPC]: Use proc_create() to setup ->proc_fops first 2008-02-28 14:00:59 -08:00
sunrpc_syms.c SUNRPC: Move exported symbol definitions after function declaration part 2 2008-02-01 17:01:24 -05:00
svc.c nodemask: use new node_to_cpumask_ptr function 2008-04-19 19:44:59 +02:00
svc_xprt.c SUNRPC: have svc_recv() check kthread_should_stop() 2008-04-23 16:13:36 -04:00
svcauth.c SUNRPC: Move exported symbol definitions after function declaration part 2 2008-02-01 17:01:24 -05:00
svcauth_unix.c SUNRPC: Move exported symbol definitions after function declaration part 2 2008-02-01 17:01:24 -05:00
svcsock.c SUNRPC: export svc_sock_update_bufs 2008-04-23 16:13:35 -04:00
sysctl.c svc: Add /proc/sys/sunrpc/transport files 2008-02-01 16:42:13 -05:00
timer.c SUNRPC: add EXPORT_SYMBOL_GPL for generic transport functions 2007-10-09 17:17:36 -04:00
xdr.c SUNRPC: don't call flush_dcache_page() with an invalid pointer 2008-04-08 21:06:50 -04:00
xprt.c docbook: sunrpc filenames and notation fixes 2008-02-13 16:21:19 -08:00
xprtsock.c net: replace remaining __FUNCTION__ occurrences 2008-03-05 20:47:47 -08:00