Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AFC15C6FD1F for ; Thu, 16 Mar 2023 18:07:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230415AbjCPSHt (ORCPT ); Thu, 16 Mar 2023 14:07:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230419AbjCPSHs (ORCPT ); Thu, 16 Mar 2023 14:07:48 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79B7EA2241 for ; Thu, 16 Mar 2023 11:06:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678990018; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=z72FvUn0C+zfgOKSCB7WUz6jlvrWtPw83T7jP3vhoiw=; b=BYRDiBJ9ZO8vTjB8+VSWevOeyLwxYNKCO0nF1HbRDz35JtgHLAW2HTBzKE3ZAqT2uoMoGq dx1byxgEcv9odeiUT3UDb+nQAZxJvR2MfpXAPP7Ag3g63a35R6vpEtaXwbGOkr7nR6LojB B5qqs9zj1GXdx1jD/MJ5TKzp8W1bjZA= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-383-2akiADSaMgOJWrCm9Xiyrw-1; Thu, 16 Mar 2023 14:06:54 -0400 X-MC-Unique: 2akiADSaMgOJWrCm9Xiyrw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 80B5D101A54F; Thu, 16 Mar 2023 18:06:53 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.33.36.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 56F502166B29; Thu, 16 Mar 2023 18:06:51 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <8F8B62FD-0F16-4383-BB34-97E850DAA7AF@hammerspace.com> References: <8F8B62FD-0F16-4383-BB34-97E850DAA7AF@hammerspace.com> <3DFBF27C-A62B-4AFE-87FD-3DF53FC39E8E@hammerspace.com> <20230316152618.711970-1-dhowells@redhat.com> <20230316152618.711970-28-dhowells@redhat.com> <754534.1678983891@warthog.procyon.org.uk> To: Trond Myklebust Cc: dhowells@redhat.com, Matthew Wilcox , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Alexander Viro , Christoph Hellwig , Jens Axboe , Jeffrey Layton , Christian Brauner , Linus Torvalds , "netdev@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , Anna Schumaker , Charles Edward Lever , "linux-nfs@vger.kernel.org" Subject: Re: [RFC PATCH 27/28] sunrpc: Use sendmsg(MSG_SPLICE_PAGES) rather then sendpage MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <809994.1678990010.1@warthog.procyon.org.uk> Date: Thu, 16 Mar 2023 18:06:50 +0000 Message-ID: <809995.1678990010@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Trond Myklebust wrote: > 1) This is code that is common to the client and the server. Why are we > adding unused 3 bvec slots to every client RPC call? Fair point, but I'm trying to avoid making four+ sendmsg calls in nfsd rather than one. > 2) It obfuscates the existence of these bvec slots. True, it'd be nice to find a better way to do it. Question is, can the client make use of MSG_SPLICE_PAGES also? > 3) knfsd may use splice_direct_to_actor() in order to avoid copying the page > cache data into private buffers (it just takes a reference to the > pages). Using MSG_SPLICE_PAGES will presumably require it to protect those > pages against further writes while the socket is referencing them. Upstream sunrpc is using sendpage with TCP. It already has that issue. MSG_SPLICE_PAGES is a way of doing sendpage through sendmsg. David