SUNRPC: Reduce asynchronous RPC task stack usage From: Trond Myklebust We should just farm out asynchronous RPC tasks immediately to rpciod... Signed-off-by: Trond Myklebust --- net/sunrpc/sched.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index c8979ce..22a097f 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c @@ -720,7 +720,12 @@ void rpc_execute(struct rpc_task *task) { rpc_set_active(task); rpc_set_running(task); - __rpc_execute(task); + if (RPC_IS_ASYNC(task)) { + INIT_WORK(&task->u.tk_work, rpc_async_schedule); + queue_work(rpciod_workqueue, &task->u.tk_work); + + } else + __rpc_execute(task); } static void rpc_async_schedule(struct work_struct *work)