Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1847339rdh; Tue, 26 Sep 2023 05:33:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFXnJ00P/NOvOFF98+/LXBzovvMy+I+w+BFRy9CT/9pvuV/qjWk7JEQf/xI3fvm9z3DXxm0 X-Received: by 2002:a05:6358:c1d:b0:143:864e:f96f with SMTP id f29-20020a0563580c1d00b00143864ef96fmr12830279rwj.1.1695731607338; Tue, 26 Sep 2023 05:33:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695731607; cv=none; d=google.com; s=arc-20160816; b=rA+D1ictj4btbKK+eErtqypuuz0zAKKXhKlilqIaXRlrllUqVuKoxVXjUwlPr0tAii XTGgZ7++9WJvWiXqyTOZrwfKtdzqw5phjVHV48a5wCYcSLISmdegbXCj1VhxPFADiqio prFV0DT0KWvrVjsSn5wIROtbMF1tvSEW+vNWtv7TRAocxtGup7jzPDyI6XC61v346pmW S2hjsiQJ6g0BTLWGVM3MGYIQOtzUySwSIZMeu0gP27XIZ7RgH62eqJs84oEB5HT3Sslg KD10pQBGtBDkrjMYs8Rb0TQT5x50qF3D17gUJ4zwSZH7vOpAGGP+gSFxOdQtgf9CcBeQ GMQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=9kfwoSttGBhiQK2071ixYuQ0vS4Si/tOXuCOSjAY61A=; fh=9WvywLgJCv2LY58Br6NG5HZcwW+nLzs0/YALo+LL2e4=; b=fgZlgCzkKzs7kClhyXyc44+8AaXqBWQ+JVjxTCezDv7wViwIBGsxMLZiBdLwmXJ2sT tLcyRZckkZHEA57yNQLuhUEtXkfh5CgRaJmDzqakHC95nkVzpMVau+FfOYqJUYIYoqWh igoc2s6xlboxeD4ycBYXFvUPjAz2Cg0PEEWKanBAD4/eQi3Bsm09odzHn4s2MaSyHr85 sRrQo0YBaNt8Jl5ADemFgx2b6IPYig4eBxcWOQgl/wxcSIT2BawacMhWTIS7tnweQMNI Y6Skj/94YZw6fNKofLpiiSLpvlxrbagKqKbRFTRyYLJYtvF6DH5t3wb8/eIWvP7OeZ2w c0AQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cDTLRJ2o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id x7-20020a634847000000b005784d9e065dsi12132419pgk.25.2023.09.26.05.33.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 05:33:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cDTLRJ2o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 12D44808D68B; Tue, 26 Sep 2023 05:26:33 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234646AbjIZM0Z (ORCPT + 99 others); Tue, 26 Sep 2023 08:26:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229827AbjIZM0X (ORCPT ); Tue, 26 Sep 2023 08:26:23 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0DA410E; Tue, 26 Sep 2023 05:26:16 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 041DBC433C7; Tue, 26 Sep 2023 12:26:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695731176; bh=TffweluRYbRpL5vhqrw+fjUyUMqGnjaG+j0AsmmrgD4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cDTLRJ2okVDacA/KYHaAcsFKP9M5VMmGXe2Zl38P3pQ9UXTLub13itqelvjI9TtWU DY1GhDtMhH5fK+7StAmBE5c2izHl60+i8GygNK5963Ke09xOmQ1rsj1pmlqihouCou SpQ3Am6y+r/nGybo236JwLCiNyTnsC7gZu0Nke+ZWscunvB+EJkU1S15Sp14LCnqK7 boumuDst0Pv3D9xj7e6NsSxoaN9AatiZ69HHZSWxb43XWXqSDlamISEUP/h4UO17Ob R+AK/fRUHGs06i1SwQK1bjZWRp8GSuZ6cJ3DQ1ECBVfHfOxKMuDd8XMXyWPWqf2eRk j5bgGOOy5aJow== Date: Tue, 26 Sep 2023 14:26:12 +0200 From: Christian Brauner To: Max Kellermann , Jens Axboe Cc: Alexander Viro , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] fs/splice: don't block splice_direct_to_actor() after data was read Message-ID: <20230926-planlos-decken-09929871d43a@brauner> References: <20230925-erstklassig-flausen-48e1bc11be30@brauner> <20230926063609.2451260-1-max.kellermann@ionos.com> <20230926-achtlos-ungeschehen-ee0e5f2c7666@brauner> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 26 Sep 2023 05:26:33 -0700 (PDT) On Tue, Sep 26, 2023 at 12:41:42PM +0200, Max Kellermann wrote: > On Tue, Sep 26, 2023 at 12:21 PM Christian Brauner wrote: > > Hm, so the thing that is worrysome about this change is that this may > > cause regressions afaict as this is a pretty significant change from > > current behavior. > > Would you prefer a new flag for explicitly selecting "wait until at > least one byte was transferred, but don't wait further"? Because many I had thought about it but afaict it'd be rather annoying as one can get into that code from copy_file_range() as well so we'd need a new flag for that system call as well afaict. > applications need this behavior, and some (like nginx) have already > worked around the problem by limiting the maximum transaction size, > which I consider a bad workaround, because it leads to unnecessary > system calls and still doesn't really solve the latency problem. > > On the other hand, what exactly would the absence of this flag mean... > the old behavior, without my patch, can lead to partial transfers, and > the absence of the flag doesn't mean it can't happen; my patch tackles > just one corner case, but one that is important for me. > > We have been running this patch in production for nearly a year (and > will continue to do so until upstream kernels have a proper solution) > and never observed a problem, and I consider it safe, but I > acknowledge the risk that this may reveal obscure application bugs if > applied globally to all Linux kernels, so I understand your worries. I think hanging for an insane amount of time is indeed a problem and tweaking the code in this way might actually be useful but we'd need to let this soak for quite a while to see whether this causes any issues. @Jens, what do you think? Is this worth it?