From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9DAD1C7EE2A for ; Fri, 19 May 2023 08:13:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230232AbjESINC (ORCPT ); Fri, 19 May 2023 04:13:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230231AbjESIM7 (ORCPT ); Fri, 19 May 2023 04:12:59 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9ECA12C; Fri, 19 May 2023 01:12:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=uXfl52cQSZRcJnVzUsCXWUNzcDZE3EsN1WwOwGRya88=; b=bTG1MIwMskxn7o3TpI9T21HZo0 x+2ECxKLocV3YID+i8Ap3pdpikQl1Pu3MwIFYPx9IywDmsvnxyNbIfCw5oBpP0CJwwl+AEreP8ByT VUUpR6srOk1ow+MMeZp1ZMfIW9RrmJ06oF9WTIEBSkZjifPAimxus5iR4eL2imIRlwSxh+h0LUyFO VBUUINYPvlm3IOwMN2rLgd2X3n7UjLslvRoy/MKjSTBRBFhxRIrSW4WKKHK6ZdonjpmlSUjWbg+uT yJayBsH0fwqibNE7Pf5RcupMcCJJYrFOyItkPhuIBQcSnYcqgLh4YBmrNo0Rr5QkdK3x9lz5RM3em PfZOe5Ag==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1pzvEC-00FTsc-2P; Fri, 19 May 2023 08:12:44 +0000 Date: Fri, 19 May 2023 01:12:44 -0700 From: Christoph Hellwig To: David Howells Cc: Jens Axboe , Al Viro , Christoph Hellwig , Matthew Wilcox , Jan Kara , Jeff Layton , David Hildenbrand , Jason Gunthorpe , Logan Gunthorpe , Hillf Danton , Christian Brauner , Linus Torvalds , 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 Subject: Re: [PATCH v20 09/32] tty, proc, kernfs, random: Use direct_splice_read() Message-ID: References: <20230519074047.1739879-1-dhowells@redhat.com> <20230519074047.1739879-10-dhowells@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230519074047.1739879-10-dhowells@redhat.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org On Fri, May 19, 2023 at 08:40:24AM +0100, David Howells wrote: > .fasync = random_fasync, > .llseek = noop_llseek, > - .splice_read = generic_file_splice_read, > + .splice_read = direct_splice_read, 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? As long as we assure direct_splice_read is simply a ->read_iter into newly allocated pages I can't think of anything that would go wrong there.