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 1CAA0C636D7 for ; Fri, 10 Feb 2023 20:45:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232770AbjBJUp3 (ORCPT ); Fri, 10 Feb 2023 15:45:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233302AbjBJUpZ (ORCPT ); Fri, 10 Feb 2023 15:45:25 -0500 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97E087BFE5 for ; Fri, 10 Feb 2023 12:45:17 -0800 (PST) Received: by mail-ej1-x631.google.com with SMTP id dr8so18838066ejc.12 for ; Fri, 10 Feb 2023 12:45:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=3ouszKA6QqICt+YxGce9SY3oz4SsHUe9oFN+JOLlH88=; b=BtUoz55elLFqQDfXVT2fRepfHO1VRasY7bNzTcVJa3+3O5Djx3ghbK7G70ibZuu5vN 3dc49Cy8mFHNkJ1Vv/oF3CA3dF13tG/Y81zRPTekzdHD6j5UHk4GfmpJ70LOUcP2NqZ2 LylcoEZit07hjr9sxmipoBqLVL7wknoCGK6LE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=3ouszKA6QqICt+YxGce9SY3oz4SsHUe9oFN+JOLlH88=; b=vW6WpqBB76vtFVF/PEs1z/LQPPWarW2Oeteq7A0WMCftZOYNxSWMQWn/AQUFq0LGvA QgwcB7/xUl3EuG4YsY0GgC4l/57A0RRVse0jCRy/3DKLJEDMtjCCi5W6jgv1dahZ4msn 0OevLtSkWfritSjmz5K2Y2vyb2M9VHZCmnKwKNpgn2XTgZWONMrN0tazeiItV7MwaExB lJWyJKCz62d5Hfga8YqHDE6stGrxvWIby4WdQDB0aBzXGiiaJINHyKS+M1SsxcKa8J99 0zrPWO1L4esAfRarqTig2ki9iZRptjqFBa4tLyVbNIASRR+JIo5jLNixj5Z8BGvRS2bK ATZA== X-Gm-Message-State: AO0yUKXt0jJRgNJJ/tUogoAedpSaj1q+JVSM0D/oqmkI232uHfkwR7qe fJONgE0giJn0Jai6+Kohg6foqxLYy/HIDn5oGwg= X-Google-Smtp-Source: AK7set94w8RwnifTrZ6m5dQFjqET+KPhkbuoVLExOu0bUXOSEQ4l6vo3N8TDOdOvUQjYS7RLxZq4hA== X-Received: by 2002:a17:907:2104:b0:88d:697d:a3d2 with SMTP id qn4-20020a170907210400b0088d697da3d2mr15835132ejb.54.1676061915782; Fri, 10 Feb 2023 12:45:15 -0800 (PST) Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com. [209.85.208.44]) by smtp.gmail.com with ESMTPSA id y22-20020a170906449600b0084d35ffbc20sm2850392ejo.68.2023.02.10.12.45.14 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 10 Feb 2023 12:45:14 -0800 (PST) Received: by mail-ed1-f44.google.com with SMTP id fj20so5881681edb.1 for ; Fri, 10 Feb 2023 12:45:14 -0800 (PST) X-Received: by 2002:a50:f603:0:b0:49d:ec5e:1e98 with SMTP id c3-20020a50f603000000b0049dec5e1e98mr3298664edn.5.1676061913926; Fri, 10 Feb 2023 12:45:13 -0800 (PST) MIME-Version: 1.0 References: <0cfd9f02-dea7-90e2-e932-c8129b6013c7@samba.org> <20230210021603.GA2825702@dread.disaster.area> <20230210040626.GB2825702@dread.disaster.area> <20230210065747.GD2825702@dread.disaster.area> <1dd85095-c18c-ed3e-38b7-02f4d13d9bd6@kernel.dk> In-Reply-To: From: Linus Torvalds Date: Fri, 10 Feb 2023 12:44:56 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: copy on write for splice() from file to pipe? To: Jens Axboe Cc: Andy Lutomirski , Dave Chinner , Matthew Wilcox , Stefan Metzmacher , linux-fsdevel , Linux API Mailing List , io-uring , "linux-kernel@vger.kernel.org" , Al Viro , Samba Technical Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org On Fri, Feb 10, 2023 at 12:39 PM Jens Axboe wrote: > > Right, I'm referencing doing zerocopy data sends with io_uring, using > IORING_OP_SEND_ZC. This isn't from a file, it's from a memory location, > but the important bit here is the split notifications and how you > could wire up a OP_SENDFILE similarly to what Andy described. Sure, I think it's much more reasonable with io_uring than with splice itself. So I was mainly just reacting to the "strict-splice" thing where Andy was talking about tracking the page refcounts. I don't think anything like that can be done at a splice() level, but higher levels that actually know about the whole IO might be able to do something like that. Maybe we're just talking past each other. Linus