Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp17912379rwd; Tue, 27 Jun 2023 09:04:03 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4YfAYZv0+knUHSaDpW3nT3/4OQXuYN6PEAN1K7RRGthM8QxYr2WK8PUAKFRhI9Y0fwm7zL X-Received: by 2002:a05:6a00:18a8:b0:67a:31b7:456c with SMTP id x40-20020a056a0018a800b0067a31b7456cmr4946809pfh.9.1687881843256; Tue, 27 Jun 2023 09:04:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687881843; cv=none; d=google.com; s=arc-20160816; b=tBK7uVhmNG4OTOrDxL+AiYPJ4ceJeayNR1Ls8f6h7e2LMKXD1ZHovRjmZDOsK80aBA W3dtt03YbLHFgG38/h4rnasj0tnXxZ3/HvzZM21W3Sh1/P7v6YL6kag/mhiGXpo/h1Tt v/fYKqYIRXximj7zRAX7cHgi2LOWT7gAg1S+TG3vIlLNDceQg1lzvrblnPIw/wpm3t0X w0i96bn5UPRsETmpmeP2a41ACeY5g9AZqQZjEfdFNeV5qMFP4FNNfHmgkB+9bVdETuu/ yd8R3UM9uzyc6syvqmGD2YwkpIpUwutTK5Uto8pdhHudRR2IjIRGF4DyZ5mG7ym4DGaN 5ypA== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=N8It8b6s3alKrTu3m8qieH3ctHYvSjGYnEsceUc2MA0=; fh=D0Qfv+SEHQhkCgJ71BaLvdOezcOj+kcZcd32/Ght7yk=; b=PZfWXVhFnCf1CrzJC34G7NCizjgtP54pxgYcBMArCfyA5pyfL4etH9XEOyl9NlPqtR R3AoEipTEQ0Jj896folUvAdSVukB3DCXQm+eXlzf0Wj+UUslZfhOYAJivhYFyNtDs6kV yR4LQMhtxrWQPLsW070a3e3m9ZKW1oMDxvmwq7z/1jyd/4b8XceIu2HRJz7vRuOHyoMs pSlpqe7OPzBBbU3L5P1EQXcpVzioGSnwvtrYLmj/r3rlam7M0EPkl6Mk1JcDyw3kXCK2 bWt0f6tgR1+S3iLcPt4G7oehp2x7jZ9D8PpM6MSw3IYawmTXo4nghqtWvvi2QZt++MZ6 4pMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="AEjG+n/b"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o1-20020a056a0015c100b006662fba14a9si7447606pfu.73.2023.06.27.09.03.48; Tue, 27 Jun 2023 09:04:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="AEjG+n/b"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231878AbjF0P7c (ORCPT + 99 others); Tue, 27 Jun 2023 11:59:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230384AbjF0P7b (ORCPT ); Tue, 27 Jun 2023 11:59:31 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72BB72D68; Tue, 27 Jun 2023 08:59:30 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 016EA611D3; Tue, 27 Jun 2023 15:59:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 04E10C433C9; Tue, 27 Jun 2023 15:59:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687881569; bh=AA3u7kz1pu0vMNPeSL/vGc5ARaKVq+llu1ZjNTFOZYY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=AEjG+n/bSqn/UH82G8HIczhWixak5ScxThjfmMOSom1fAGV4FP1vd9ebK46Wuz2jr 6ywXrGKYTf08EabwSo2e/C10RS6x2Im/4ZwHxfXtkFWKT0tBsFToh1WaFTerJU+c1V Jo08l+xxO6Gg6MEHS3rgX0YABVC3s0laavLbYzjXidie28j32/MqcCdEIFmwzUdgk8 wDplROUqNRcYqxhIWuUa/pzhrTtO9pIYu1XAAcW/WBweTo30W2aL2Ztx7kdgFzTCGF 8YFpNCSQM8GzHBgJvTTXZATWEaz6VHZDvPXCT8/lC06ZFeNhmHW5CX4clk6CjLBysA Y4h11ieYXXwVg== Date: Tue, 27 Jun 2023 08:59:28 -0700 From: Jakub Kicinski To: David Howells Cc: Ilya Dryomov , netdev@vger.kernel.org, Xiubo Li , Jeff Layton , "David S. Miller" , Eric Dumazet , Paolo Abeni , Jens Axboe , Matthew Wilcox , ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v3] libceph: Partially revert changes to support MSG_SPLICE_PAGES Message-ID: <20230627085928.6569353e@kernel.org> In-Reply-To: <3199652.1687873788@warthog.procyon.org.uk> References: <3199652.1687873788@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 27 Jun 2023 14:49:48 +0100 David Howells wrote: > Fix the mishandling of MSG_DONTWAIT and also reinstates the per-page > checking of the source pages (which might have come from a DIO write by > userspace) by partially reverting the changes to support MSG_SPLICE_PAGES > and doing things a little differently. In messenger_v1: > > (1) The ceph_tcp_sendpage() is resurrected and the callers reverted to use > that. > > (2) The callers now pass MSG_MORE unconditionally. Previously, they were > passing in MSG_MORE|MSG_SENDPAGE_NOTLAST and then degrading that to > just MSG_MORE on the last call to ->sendpage(). > > (3) Make ceph_tcp_sendpage() a wrapper around sendmsg() rather than > sendpage(), setting MSG_SPLICE_PAGES if sendpage_ok() returns true on > the page. > > In messenger_v2: > > (4) Bring back do_try_sendpage() and make the callers use that. > > (5) Make do_try_sendpage() use sendmsg() for both cases and set > MSG_SPLICE_PAGES if sendpage_ok() is set. > > Fixes: 40a8c17aa770 ("ceph: Use sendmsg(MSG_SPLICE_PAGES) rather than sendpage") > Fixes: fa094ccae1e7 ("ceph: Use sendmsg(MSG_SPLICE_PAGES) rather than sendpage()") > Reported-by: Ilya Dryomov Ilya, would you be okay if we sent the 6.5 PR without this and then we can either follow up with a PR in a few days or you can take this via your tree? Or you could review it now, that'd also work :) In hindsight we should have pushed harder to make the FS changes as small as possible for sendpage removal, so that they can go in via the appropriate tree with an appropriate level of scrutiny for 6.6, lesson learned :(