SUNRPC: Declare RPC timers as TIMER_DEFERRABLE
authorTrond Myklebust <trondmy@gmail.com>
Sun, 7 Apr 2019 17:58:52 +0000 (13:58 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Thu, 25 Apr 2019 18:18:13 +0000 (14:18 -0400)
Don't wake idle CPUs only for the purpose of servicing an RPC
queue timeout.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
net/sunrpc/sched.c
net/sunrpc/xprt.c

index 301e0f7f1dc98b191290ccc529d13da544eb47e6..1a12fb03e611d4213dc9e59c60dda4864817ab50 100644 (file)
@@ -249,7 +249,9 @@ static void __rpc_init_priority_wait_queue(struct rpc_wait_queue *queue, const c
        queue->maxpriority = nr_queues - 1;
        rpc_reset_waitqueue_priority(queue);
        queue->qlen = 0;
-       timer_setup(&queue->timer_list.timer, __rpc_queue_timer_fn, 0);
+       timer_setup(&queue->timer_list.timer,
+                       __rpc_queue_timer_fn,
+                       TIMER_DEFERRABLE);
        INIT_LIST_HEAD(&queue->timer_list.list);
        rpc_assign_waitqueue_name(queue, qname);
 }
index 7c3623b174939da63d897dc41a2b11c3be7627d1..36af1a1929afe70467c2e1a62cb35570ccdd1413 100644 (file)
@@ -1842,7 +1842,9 @@ found:
                xprt->idle_timeout = 0;
        INIT_WORK(&xprt->task_cleanup, xprt_autoclose);
        if (xprt_has_timer(xprt))
-               timer_setup(&xprt->timer, xprt_init_autodisconnect, 0);
+               timer_setup(&xprt->timer,
+                               xprt_init_autodisconnect,
+                               TIMER_DEFERRABLE);
        else
                timer_setup(&xprt->timer, NULL, 0);