Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp17975601rwd; Tue, 27 Jun 2023 09:51:43 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4UeIoAA7pNliapmRVeQHoGH+19QLJkq1Yy2NhrHvoQP2X8YAfRkcj/pe465rgCnTPOqWH1 X-Received: by 2002:a05:6a21:78a9:b0:10a:cb95:5aa3 with SMTP id bf41-20020a056a2178a900b0010acb955aa3mr40689262pzc.7.1687884703355; Tue, 27 Jun 2023 09:51:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687884703; cv=none; d=google.com; s=arc-20160816; b=j9MEUFnY09oBja/BWxIqvpwHBZyfptihQcm7E9d5BEFfISbkb1wWuUZ8AP9zM9nvAU HuMs8mesnGAuUhXLAVJUaQw7lWjVIqIp94YDDKHkURCpSbkIMS4Ha554QHlr5j7cqGCr w11J9PPbe34C9g9Pvixmx6p9mBJdMC+c+VQTGZOoJPa4+RC6ZcBQgqtN30lSzkW+sTGF dq8H5PL3BBNWwULNjWkiYpXUaUCexM/9LyYFOiZjmtqd/xYy2VHTfJKR8JscitXzGD/B Eq5jH5vHhL8l0mD4Av5y0vqLH6gbHPgFn8ZO7dXP5gkIJ8CV+l0jNj+2K5iPrtUaDx3l 0cJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=Tpd3lAFkgPOZAmtsEdYx4agOG1zhm3c7wmN24nFCRP8=; fh=v8YDEeV2dw24slAFQcoIBaUre3iW2AUojS8ftUWwlJ8=; b=qNREDR0mc+l4v9Jz0W3gczzmK3RhiW80oCxUUV3Wc8HTT0M4a5P6HEgKQMVR6qoN+Q plcbA68BuKGO+JWWGDjGudPvgj23nNqty1XflkQQK9zgiAeAJHYeHwfBPgbywSvOxSwV 34kbuxCd45+OPrrX1v9lJwkWsb+y23A+teq+BIrqnS1SjPNEWCa5DjQ9ezk00f1ieRtB UEYlExFksv9WU8IW9wDFc50dYTPhHZH0C7J+BOeON86NY0KqRwfqcBGukX8N5enoHdwO Q5ToRY4scaoSJlDXOSUny3lBYclLITBX4SYwvp/n1s+WF5ndzpvbkCSad3rVQCHSEvem voPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=q06GNPWO; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l70-20020a639149000000b005481915c0d1si7716818pge.45.2023.06.27.09.51.28; Tue, 27 Jun 2023 09:51:43 -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=@gmail.com header.s=20221208 header.b=q06GNPWO; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232218AbjF0QIq (ORCPT + 99 others); Tue, 27 Jun 2023 12:08:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232137AbjF0QIh (ORCPT ); Tue, 27 Jun 2023 12:08:37 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3223930FF; Tue, 27 Jun 2023 09:08:34 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-98df69cacd1so303552666b.1; Tue, 27 Jun 2023 09:08:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687882111; x=1690474111; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Tpd3lAFkgPOZAmtsEdYx4agOG1zhm3c7wmN24nFCRP8=; b=q06GNPWOebOMOVK5HxSGaEx7LPlAXSxIc/Aq8MQqa1KOppEIqGqtMhwG4NpjZkOm9S AFyR5QRFV5Y4HWjtBCFBNLrJk5S4Lc7K8YZNHrIZdxMmDQA/+lLQ3p8y9UgKzJsIf86A 6mgRi6asDKOmW/iWnEEaxh6aCjW2wpoxwylPIFbl3o9t7f68PKixGMqc9eY+4A0mQYyK /NKPB7mafWWAJMN3H/YcHBf8569Pxbdxn2kFSPB9d/Zx+IZTpfRyXx13QuiKS/N9+aK/ qXilL+LWm4uaO9ESacaaI9YCZeZXSWrdMC3YtgW+4T2fSzrERUBgn1BaSIhHBSbx3TEd 2oEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687882111; x=1690474111; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Tpd3lAFkgPOZAmtsEdYx4agOG1zhm3c7wmN24nFCRP8=; b=Tf7oe1AACsmCnbfhu/0NRKfe6T+07LH+TWtI1Hb1ZRkMsgt+MAFDH5ONX6kWM5fY+f QwurXlBnM9tPohvOiiaXrKdvERvCb8vDjE2y2H5sHN/ng2qcAi98AcIOmGMuIxjGxj89 iLKZLFVRR0khDgi22tdH/G3E7kv3f9Zp/nSPHRAhaZKXh7lXNqPlT6Si14noQfTyA5NC Kzm1OwE1WUdHSYqjVv9qCiFp92YIMo1zqcf7mVQa6Y49505FDISnBlq7cYVlsNIgHn3A aoet7zhHTYBF+r3W+Zh7Cb9QhI9BNdAcTi5ifaG5a2CqVROkQdMRU3cs7vheCZJ7usEG 6hbQ== X-Gm-Message-State: AC+VfDxcAb1/TNIsDbRQ6eLPf/7KGaWqQEce6bu+tutM3BcK0zYiqevB tjnYIR/nYocPLLpLTVOkUIi950noMnh5UfQJt1bJ7DX8Zd9ySQ== X-Received: by 2002:a17:907:803:b0:982:cfe2:32fe with SMTP id wv3-20020a170907080300b00982cfe232femr28075108ejb.63.1687882111373; Tue, 27 Jun 2023 09:08:31 -0700 (PDT) MIME-Version: 1.0 References: <3199652.1687873788@warthog.procyon.org.uk> <20230627085928.6569353e@kernel.org> In-Reply-To: <20230627085928.6569353e@kernel.org> From: Ilya Dryomov Date: Tue, 27 Jun 2023 18:08:19 +0200 Message-ID: Subject: Re: [PATCH net-next v3] libceph: Partially revert changes to support MSG_SPLICE_PAGES To: Jakub Kicinski Cc: David Howells , 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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, Jun 27, 2023 at 5:59=E2=80=AFPM Jakub Kicinski wr= ote: > > 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_PAG= ES > > 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 w= ere > > passing in MSG_MORE|MSG_SENDPAGE_NOTLAST and then degrading that t= o > > 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 s= endpage") > > Fixes: fa094ccae1e7 ("ceph: Use sendmsg(MSG_SPLICE_PAGES) rather than s= endpage()") > > 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 :( Hi Jakub, This patch looks good to me. I have been meaning to actually test it, but, if time is of the essence, I'm OK with it being merged via the networking tree now. Reviewed-by: Ilya Dryomov Thanks, Ilya