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 7637BC64EC7 for ; Fri, 10 Feb 2023 20:27:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232801AbjBJU1a (ORCPT ); Fri, 10 Feb 2023 15:27:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233742AbjBJU11 (ORCPT ); Fri, 10 Feb 2023 15:27:27 -0500 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2ABB657775 for ; Fri, 10 Feb 2023 12:27:21 -0800 (PST) Received: by mail-ej1-x629.google.com with SMTP id dr8so18746156ejc.12 for ; Fri, 10 Feb 2023 12:27:21 -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=ZamuEXhcVKZ56iZ3/bDfyhF3ja60Eault4YAmV7SNAQ=; b=TsQKwX+1pP22FCPs56/vCyqzRlBYKeuKP+V+HcYEmqly8S8QflkfYnflBEP5lT6H5b F5OqDGoPLeri/hXpHRWaa+8lQPdUE2328dZc2DlNg611cY7QRaeODNzYeLtGw62oGpye 2d9QF4GSiwH6uplYVACzSv0yvdtDNJX7mh9+w= 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=ZamuEXhcVKZ56iZ3/bDfyhF3ja60Eault4YAmV7SNAQ=; b=24kcXt3V5UWjreBnousxasZ0hhSRYawSm+ly3pfIJl8RZnLUACpYZlZQv6BjtWYhyq 8uSGodzpY5rduIYpoo4gFip0Lngv/a+jngci3GgyGpGcpS9rRM3lwya8F4QVyd0u/Nn8 nFCwKmWPX2v5mlI6wbw9EkGmGtpAKMrUuB/WUqCWe6bXQx1gIyWfQm+wHVMW4IDHCQOr oA24pLzxFNXf4qXbiTRxFlPMi1YPoby+bgOAapOiN4hOhMYb+DsrGO19ObVfIJ4RNfzI FeBcpz6iOyC4R63Hit0BM0n2nlWWxD5I45sMLPX5LlikHjAbtVkukJyAE2AULXIKnp2j GFVA== X-Gm-Message-State: AO0yUKXfGPWykSgO3BqqfCZxOou2rGhUFiS2juDBEFS8VkGtNGqu+IT7 Lyz7YFtugySznRij/axlIHPQPDa/eE7fV08zJes= X-Google-Smtp-Source: AK7set+2Vr2BdRcPEUSV6P120C0LFwfIKw3+AkwXDQzjsLUK4BODzkNRcku9RYOHbkVJq0m/kdbQpQ== X-Received: by 2002:a17:906:798:b0:88f:6a7e:5fe8 with SMTP id l24-20020a170906079800b0088f6a7e5fe8mr18290418ejc.22.1676060839039; Fri, 10 Feb 2023 12:27:19 -0800 (PST) Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com. [209.85.218.43]) by smtp.gmail.com with ESMTPSA id z12-20020a17090674cc00b008aac25d8f7fsm2888165ejl.97.2023.02.10.12.27.18 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 10 Feb 2023 12:27:18 -0800 (PST) Received: by mail-ej1-f43.google.com with SMTP id qb15so16759228ejc.1 for ; Fri, 10 Feb 2023 12:27:18 -0800 (PST) X-Received: by 2002:a17:906:9381:b0:878:8061:e114 with SMTP id l1-20020a170906938100b008788061e114mr1469478ejx.0.1676060838145; Fri, 10 Feb 2023 12:27:18 -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> In-Reply-To: From: Linus Torvalds Date: Fri, 10 Feb 2023 12:27:01 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: copy on write for splice() from file to pipe? To: Andy Lutomirski Cc: Dave Chinner , Matthew Wilcox , Stefan Metzmacher , Jens Axboe , 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: linux-kernel@vger.kernel.org On Fri, Feb 10, 2023 at 11:56 AM Andy Lutomirski wrote: > > i think this is almost exactly what Jeremy and Stefan are asking for > re: notification when the system is done with a zero-copy send: Yeah, right now it's all just "incremented page counts", I think. Even the pipe code itself doesn't know about writes that have already been done, but that are pending elsewhere. You'd have to ask the target file descriptor itself about "how much do you have pending" or something. Linus