Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2734607rwd; Fri, 19 May 2023 09:28:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ48XKYLQoCgP6LFeVwMUofifSz+7un69D+H+Ot7k8lnQhX0a2aE7ck65HjVkydVE6JP3p++ X-Received: by 2002:a17:90a:6506:b0:24e:4c8:3ae5 with SMTP id i6-20020a17090a650600b0024e04c83ae5mr2889372pjj.28.1684513697089; Fri, 19 May 2023 09:28:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684513697; cv=none; d=google.com; s=arc-20160816; b=GMVHUpe1moI4WeieATcWHeEf6jx18I98lSuF3Hk9At+R9VJuHxMafqGsAyPLOY+iOd JyZot8OipwRu1l6B6NB9aG8u3mKtLwxL0VzCYH8vo3JmW41NfskNugQmQUxb6kUCXn4z JYIIIsF9GExvJtNnbnufLkd9OoE28+jAw5LbZfSa1hqI/dbIeN0LQnwOc8xxiIpKni0o cta0mwJuReQJF0JETExpA+e2QtKaLm6J+k/C1Q+SvrMNRJoNGWn4iJ6MF6xhpB5U19uc tLvugQDacfwx6Y0940LCaLT5cjwy9M/vjmf4PPqRIN/Si3bJAlR3Nh8rVnpmVWIkVOMs YLhQ== 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=kK1ZTkygyrBiweN68dKEUcpOojpjbump5mMSvci/Nuk=; b=pdc9FnOKuDw7V6bhPBhbY+gvWyX8Wr6hPZUQbEt3//atHfLHEDKOZVgRctxOefaeiX V8/4IqS2AuzDNMooruwa+QPCdDAwoVBwTdW44nn4lSez7O4feCXH9OeSqaVQiZQ8Yxeb Hj8S2DT0/OFyOfhzl+SXFgTTBHp0xvo8fgvhSmx1X0KkNiVeXmpNVpXBYfX7BNx8kUVt oQjh5HlNCNpJP1oX2Zl5mizDV4YePBqo6dgIopMK6PAcN/BhY4VOkkasrIvjq076ZJHj 8MtdVfzfk/wfXgRIeGLXFTq+z3xaXBSg/dbD11hex3HoFiiaEYC0bczNGAGCxzGp5pMC xdSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=bwtFDBDC; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v62-20020a638941000000b005347c4d09ddsi3119255pgd.678.2023.05.19.09.28.02; Fri, 19 May 2023 09:28:17 -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=@linux-foundation.org header.s=google header.b=bwtFDBDC; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230406AbjESQW6 (ORCPT + 99 others); Fri, 19 May 2023 12:22:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229684AbjESQWw (ORCPT ); Fri, 19 May 2023 12:22:52 -0400 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D56110C9 for ; Fri, 19 May 2023 09:22:42 -0700 (PDT) Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-96f6a9131fdso120780966b.1 for ; Fri, 19 May 2023 09:22:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1684513360; x=1687105360; 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=kK1ZTkygyrBiweN68dKEUcpOojpjbump5mMSvci/Nuk=; b=bwtFDBDC3jTlfO6bC+iFLb7YneWb5Ug61piudRWSqHfASXBjBRMDV8MSVD9ZYlplFB tqcnQgLe3Dwu2YHtisEWRqrETv1ThJSxv7HNdj6XstcShJeZnebWEtzJKDR+prHqSw8W TZ908EW8sXWw9AzcL9V6nGNZc3jYwSnX1Xq7s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684513360; x=1687105360; 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=kK1ZTkygyrBiweN68dKEUcpOojpjbump5mMSvci/Nuk=; b=OxThvR1Duid+1y5Q2+IahOX+ThzTAkWrtrMlq1bAXwy7hrX8DKLjM7DDeqnSRZXSS3 oLBDQ52o3aoQaHXkEBJed2J3GbT1cgIweCTTGtuJiOQFmyNe6B1c5gR9rvoBd5iMu/vh vt39+tkxW+0kTYYh7EbuRvuAmACXE7YbDpGIxDABVqnDmlnAPi8cNO57EHPN7IKbG4Tw TuKdfcGSQtUog7gfXQS5kd28Xs/K/GAV120XOcWYfcZNNJDRFJOuA4AzgMoYDYkDBptM EzP7GFs06bBLwOfC0IYL2zlBr5ARh8j3G2qX7gbdjF2iMdBLDgB/vwK0wFtUiJpHnVIc b/Mg== X-Gm-Message-State: AC+VfDyY9JuVwFkJHCSUxg8mE8timLuqa+56QUgRLAyabI6K/HZSIRer RE/moQAy8YcsT3JjkgfV7gxV14Ri7AAlssZK2qE5VyMP X-Received: by 2002:a17:907:709:b0:965:6075:d0e1 with SMTP id xb9-20020a170907070900b009656075d0e1mr1844213ejb.72.1684513360561; Fri, 19 May 2023 09:22:40 -0700 (PDT) Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com. [209.85.208.54]) by smtp.gmail.com with ESMTPSA id kq2-20020a170906abc200b0096f89c8a2f7sm57958ejb.90.2023.05.19.09.22.39 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 19 May 2023 09:22:39 -0700 (PDT) Received: by mail-ed1-f54.google.com with SMTP id 4fb4d7f45d1cf-510ddeab704so3850162a12.3 for ; Fri, 19 May 2023 09:22:39 -0700 (PDT) X-Received: by 2002:a05:6402:2d5:b0:510:f6e0:7d9f with SMTP id b21-20020a05640202d500b00510f6e07d9fmr2254674edx.13.1684513359285; Fri, 19 May 2023 09:22:39 -0700 (PDT) MIME-Version: 1.0 References: <20230519074047.1739879-1-dhowells@redhat.com> <20230519074047.1739879-10-dhowells@redhat.com> In-Reply-To: From: Linus Torvalds Date: Fri, 19 May 2023 09:22:22 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v20 09/32] tty, proc, kernfs, random: Use direct_splice_read() To: Christoph Hellwig Cc: David Howells , Jens Axboe , Al Viro , Matthew Wilcox , Jan Kara , Jeff Layton , David Hildenbrand , Jason Gunthorpe , Logan Gunthorpe , Hillf Danton , Christian Brauner , linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Greg Kroah-Hartman , Christoph Hellwig , John Hubbard , Miklos Szeredi , Arnd Bergmann Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=no 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 Fri, May 19, 2023 at 1:12=E2=80=AFAM Christoph Hellwig wrote: > > Pinging Al (and maybe Linus): is there any good reason to not simply > default to direct_splice_read if ->read_iter is implemented and > ->splice_read is not once you remove ITER_PIPE? For me, the reason isn't so much technical as "historical pain". We've had *so* many problems with splice on random file descriptors that I at some point decided "no splice by default". Now, admittedly most of the problems were due to the whole set_fs() ambiguity, which you fixed and no longer exists. So maybe we could go back to "implement splice by default". I agree that as long as the default implementation is obviously safe, it should be ok, and maybe direct_splice_read is that obvious.. Linus