Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2128102rdh; Tue, 26 Sep 2023 13:23:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH1oJtL9id1aJ1LrppwAtd12+8oUHCbtQgvNHreVZ2UtIVYDbR91am3FOIIt9goUtTGsYaB X-Received: by 2002:a05:6a20:1593:b0:14e:3daf:fdb9 with SMTP id h19-20020a056a20159300b0014e3daffdb9mr13314543pzj.22.1695759807455; Tue, 26 Sep 2023 13:23:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695759807; cv=none; d=google.com; s=arc-20160816; b=Zx1fD0wuAMVw/fkUGeVLm2u89cgqDLay8xDLJkRuH15FEsMgpjHYVBQvZ3rQ6E9WJ6 +sX6mcOsMAKuWr65If2ureuoXRdK/hK5Cr7daTqNmfgJkfN0w6sp9tmfZQnEId+jNI0q AgiGn1R2p639vU+BWmMMasLeD0FCAkz+yK7fWS5hRa4yVfNS888M5SpivUlOdlNgBeyd TZuHarwaumIfQB0MiGhN9OmoQ2OCdVN3BcKaDUwHs4HnY0Q8xbFXCKLQ7WNe9tXaH34j 1Q+x25xSj+XIiYh1QAiRdeBtfK4ep6tVPaGcyKvTpI7wG1UvnXW6WoOu31IhOAV2F4Nc TKSw== 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=HLu9xemBg1ip5g4bQWEMv6HdoqSuDts/Nrj5Q5I9bIc=; fh=3AkGRV0RyQeYOatEB/jZYOKxjmRaWNikPolRd4TnWLs=; b=WWEtRXm9v2si3Xwfo2vMGUmdOfOA9zvniRGNQ4KSf+NRfRXNR24l+zC2tNsAfLuoXI RVKLk15xJe7h1ycqRQk0qIBik0aZ+iUyCJdsdCHerXcHZWb7YdneGShXrwjG19ylS5uj 2BNw5iOBXVlwyrb1jVyzE/woEGfDb4sHacOcG2NNseolaTR5gXduW+K0Cd2ceKnTDnTr 1rcFCzB79hgxneYoviozhg1VM456yrWR+wbvH7Mvk4vfvmD155irj0U6wW1PwwyyDF3K xq45OzCnqUJ/SCMqJXCtyg1+89VrRxfHw171W3mEIlnMzm3ICvlLe92x8b/EnjN6DD+V 7PJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ionos.com header.s=google header.b=X1RkhR+f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ionos.com Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id l5-20020a170903120500b001b84335fb90si14255891plh.286.2023.09.26.13.23.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 13:23:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@ionos.com header.s=google header.b=X1RkhR+f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ionos.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 670DD826EE1C; Tue, 26 Sep 2023 03:42:16 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234433AbjIZKmE (ORCPT + 99 others); Tue, 26 Sep 2023 06:42:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234429AbjIZKmC (ORCPT ); Tue, 26 Sep 2023 06:42:02 -0400 Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A00E010C for ; Tue, 26 Sep 2023 03:41:55 -0700 (PDT) Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2b962c226ceso143167521fa.3 for ; Tue, 26 Sep 2023 03:41:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ionos.com; s=google; t=1695724914; x=1696329714; darn=vger.kernel.org; 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=HLu9xemBg1ip5g4bQWEMv6HdoqSuDts/Nrj5Q5I9bIc=; b=X1RkhR+flpLmNX7yGkiMU/YuTd73pUS9R6icIt7GFd3+5quATTozvntHsgCdo1ivHY nOsEqepNP9YQVM+Wt8e17HwiL4KaJbiTyCyEUxBV1UWUZ33WovgQQfEfdX8lRgS75xcp Rd+e4VaSvsB9UwHRIoxp4fSXBCWCFTtLKpc8RkMHAr/rJ47sWXg60uIEtU/1uh/Jswri fUJAbEnXY9zxbnhZ/keh0ex8MwS/4WmXb6mL9k5E+h4hZoZ3JWFk5FF4pO/2hRCxBqCn K/zOBKagNjMHEXBTRQXX2ngExzmWw4w0utmT+r8PmoZFBRlqGdC9XYm1N2NXcGjy8uAs 8GEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695724914; x=1696329714; 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=HLu9xemBg1ip5g4bQWEMv6HdoqSuDts/Nrj5Q5I9bIc=; b=Vi63UlDCRKWqlRT/0vzNNK8VMpsEwjjlqmBXkkEgF4WwFxo2y30U9MMIlGfW4JhmlW oiYXbd32HTNRO80vJ75tMuoRxX6EuNV6yyJqp/nz6UXUswEljfRnH36bY4LN4wT2M2BH IRCcmsXX856YFzXfnweddumAgivcBftnLIMf3HM9xpPUhRQ006fmoEdJRr5tMXy7G81x U6REwRI/ylTNOs5V0ZvQ6F7jXxSm7FIE6KXytmf37ORPIn8xhJG3UqhUFxp8Sxg/UufZ Hav0XZ+93b9qrdiJIXN3VTOEJjW69FY1dOi+vJRtbG2YURbFHmIdG679cGb9LkNJA2b4 HpiA== X-Gm-Message-State: AOJu0YzQKgDd7DbT0C0fUIqyiHlYA8ezeyi1xFIjE1e3T/W8687O7M+2 kA7PkHj9OPWeYIw3bQD7anl7K0+j08996fEX+CEebFP9qHkFLEBZtm8= X-Received: by 2002:a2e:82d6:0:b0:2bd:1dc0:5ed5 with SMTP id n22-20020a2e82d6000000b002bd1dc05ed5mr7300512ljh.23.1695724913799; Tue, 26 Sep 2023 03:41:53 -0700 (PDT) MIME-Version: 1.0 References: <20230925-erstklassig-flausen-48e1bc11be30@brauner> <20230926063609.2451260-1-max.kellermann@ionos.com> <20230926-achtlos-ungeschehen-ee0e5f2c7666@brauner> In-Reply-To: <20230926-achtlos-ungeschehen-ee0e5f2c7666@brauner> From: Max Kellermann Date: Tue, 26 Sep 2023 12:41:42 +0200 Message-ID: Subject: Re: [PATCH v2] fs/splice: don't block splice_direct_to_actor() after data was read To: Christian Brauner Cc: Alexander Viro , Jens Axboe , linux-fsdevel@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=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,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 morse.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 (morse.vger.email [0.0.0.0]); Tue, 26 Sep 2023 03:42:16 -0700 (PDT) On Tue, Sep 26, 2023 at 12:21=E2=80=AFPM 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 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. Max