SUNRPC: Resupply rq_pages from node-local memory
authorChuck Lever <chuck.lever@oracle.com>
Mon, 15 May 2023 13:47:29 +0000 (09:47 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 5 Jun 2023 13:01:44 +0000 (09:01 -0400)
svc_init_buffer() is careful to allocate the initial set of server
thread buffer pages from memory on the local NUMA node.
svc_alloc_arg() should also be that careful.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
net/sunrpc/svc_xprt.c

index 42536a0..9ca3393 100644 (file)
@@ -685,8 +685,9 @@ static int svc_alloc_arg(struct svc_rqst *rqstp)
        }
 
        for (filled = 0; filled < pages; filled = ret) {
-               ret = alloc_pages_bulk_array(GFP_KERNEL, pages,
-                                            rqstp->rq_pages);
+               ret = alloc_pages_bulk_array_node(GFP_KERNEL,
+                                                 rqstp->rq_pool->sp_id,
+                                                 pages, rqstp->rq_pages);
                if (ret > filled)
                        /* Made progress, don't sleep yet */
                        continue;