Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

svcrdma: preserve rq_next_page in svc_rdma_save_io_pages

svc_rdma_save_io_pages() transfers response pages to the send
context and sets those slots to NULL. It then resets rq_next_page to
equal rq_respages, hiding the NULL region from
svc_rqst_release_pages().

Now that svc_rqst_release_pages() handles NULL entries, this reset
is no longer necessary. Removing it preserves the invariant that the
range [rq_respages, rq_next_page) accurately describes how many
response pages were consumed, enabling a subsequent optimization in
svc_alloc_arg() that refills only the consumed range.

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>

+2 -4
+2 -4
net/sunrpc/xprtrdma/svc_rdma_sendto.c
··· 858 858 859 859 /* The svc_rqst and all resources it owns are released as soon as 860 860 * svc_rdma_sendto returns. Transfer pages under I/O to the ctxt 861 - * so they are released by the Send completion handler. 861 + * so they are released only after Send completion, and not by 862 + * svc_rqst_release_pages(). 862 863 */ 863 864 static void svc_rdma_save_io_pages(struct svc_rqst *rqstp, 864 865 struct svc_rdma_send_ctxt *ctxt) ··· 871 870 ctxt->sc_pages[i] = rqstp->rq_respages[i]; 872 871 rqstp->rq_respages[i] = NULL; 873 872 } 874 - 875 - /* Prevent svc_xprt_release from releasing pages in rq_pages */ 876 - rqstp->rq_next_page = rqstp->rq_respages; 877 873 } 878 874 879 875 /* Prepare the portion of the RPC Reply that will be transmitted