Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp4740801pxb; Tue, 31 Aug 2021 12:07:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzgMaAuZcf+Ba9Hy1lAK9euWP50dFnGZyC7K1CxKIUnTQA2dPGaYcKYHcAo60SHV6wgXGtR X-Received: by 2002:a17:906:f20a:: with SMTP id gt10mr31578487ejb.487.1630436874407; Tue, 31 Aug 2021 12:07:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630436874; cv=none; d=google.com; s=arc-20160816; b=gWVAH4Rm+qzq0qPubwOKYKRecYaC7PTT5CNqcz4ByBQP8MpEqDDrDl+ehosppSt16N ca2RWRtWtR8fYMech+xu4L4T+nleV+L5V0Balk6c38uuNOEIPATiUnA/Mxeu+79hH+bz JM7o0zKUuayJPI+FfoKf/tlo51Zlonvs8ZEAeghwY2is8m+WgHZgSxuK8u7AvRsBGddg Iowg4xsIDdec2jwnjSQ1+3G0K3EBbpxSLUQ1HaPNNHguxgyJJ7Z9WDdHj6v8REHX8bwU i2QyGoNROudzWH/bwMbKUUEoQuAn7IGnY42ksLbadCGlxeqKRvuDGrdJe1dFerbnr0pk ryvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:message-id:date:cc:to:from:subject; bh=VOkidBk+6x4E1oQzaPM0AGtr5XFdtIoAOvxT5Ckpk/E=; b=0xG7VZgZ0LKUfLm/Q9hMV4Jj91jgZPTiI86rsdr9YymgwHjmzLihAswG4x/KobZkEA ew7B7cHRzhhNZVgbLJC4En73vj3TaiVeBkcgqUS1m1lgC9k/fHgQ3s440foKkLJ+BWGw kWRriHR4tA/d4vuAXouXfcqWJy+SKMrUAvPkqctdqa1w273TEgNrv/FWc9r6BBvK4JNt bLTxlMVmXq9fIkb6stznXhsfGN5EyhSLf+OTheMhzZ7tAI3KpjggIKfFD788n+YHPqoN AnsMRndZl1SAjE4D56QTD+nQYDSnXZgk6vl/1GmkuuSl8+Z9CrQFp3NwhoKntMaf2hBm e4HQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s15si17981612ejc.168.2021.08.31.12.07.31; Tue, 31 Aug 2021 12:07:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240142AbhHaTGL (ORCPT + 99 others); Tue, 31 Aug 2021 15:06:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:34528 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240249AbhHaTGG (ORCPT ); Tue, 31 Aug 2021 15:06:06 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 79EB061041; Tue, 31 Aug 2021 19:05:10 +0000 (UTC) Subject: [PATCH RFC 0/6] NFSD: Pull Read chunks in XDR decoders From: Chuck Lever To: bfields@fieldses.org Cc: linux-nfs@vger.kernel.org, linux-rdma@vger.kernel.org Date: Tue, 31 Aug 2021 15:05:09 -0400 Message-ID: <163043485613.1415.4979286233971984855.stgit@klimt.1015granger.net> User-Agent: StGit/1.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Hi Bruce- Here is part of what we discussed recently about trying to align pages in NFS WRITE requests so that splice can be used. This series updates server-side RPC and svcrdma to ensure that an aligned xdr_buf::pages array is presented to NFSD, which is then converted into an aligned rq_vec for the VFS layer. The next step would be to look at how to make the best use of the aligned rq_vec. My naive thought is that where there is a PAGE_SIZE entry in rq_vec and there is no page in the file's page cache at that offset, the transport-provided page can be flipped into place. Might work for replacing whole pages as well, but baby steps first. This series has been exercised a bit with both TCP and RDMA, but no guarantees that it is completely bug-free. NFSv4 compounds with multiple WRITE payloads on RDMA are treated like TCP: the RPC message is contained in an unstructured stream of unaligned pages. Comments encouraged. --- Chuck Lever (6): SUNRPC: Capture value of xdr_buf::page_base SUNRPC: xdr_stream_subsegment() must handle non-zero page_bases NFSD: Have legacy NFSD WRITE decoders use xdr_stream_subsegment() SUNRPC: svc_fill_write_vector() must handle non-zero page_bases NFSD: Add a transport hook for pulling argument payloads svcrdma: Pull Read chunks in ->xpo_argument_payload fs/nfsd/nfs3proc.c | 3 +- fs/nfsd/nfs3xdr.c | 16 +-- fs/nfsd/nfs4proc.c | 3 +- fs/nfsd/nfs4xdr.c | 6 + fs/nfsd/nfsproc.c | 3 +- fs/nfsd/nfsxdr.c | 13 +-- fs/nfsd/xdr.h | 2 +- fs/nfsd/xdr3.h | 2 +- include/linux/sunrpc/svc.h | 6 +- include/linux/sunrpc/svc_rdma.h | 8 ++ include/linux/sunrpc/svc_xprt.h | 3 + include/trace/events/rpcrdma.h | 26 +++++ include/trace/events/sunrpc.h | 20 +++- net/sunrpc/svc.c | 38 +++++-- net/sunrpc/svcsock.c | 8 ++ net/sunrpc/xdr.c | 32 +++--- net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 37 +++++- net/sunrpc/xprtrdma/svc_rdma_rw.c | 139 ++++++++++++++++++++--- net/sunrpc/xprtrdma/svc_rdma_transport.c | 1 + 19 files changed, 292 insertions(+), 74 deletions(-) -- Chuck Lever