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 F3F31C6379F for ; Fri, 10 Feb 2023 20:27:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233774AbjBJU12 (ORCPT ); Fri, 10 Feb 2023 15:27:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233734AbjBJU11 (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 28C8757763 for ; Fri, 10 Feb 2023 12:27:21 -0800 (PST) Received: by mail-ej1-x629.google.com with SMTP id qb15so16759342ejc.1 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=d+4dBh1rBXSFBNhLeQ9t9Sg3PEs1yfJ/fq7TL+XUDAMVT3EaBHJVM9egzuPMDDeEKX pfz8ygY/965lNa31Xx2L3bZjifFre5r0Uoha3cbCnzxqU+oXRfMtTSV5XS1HLJ50jDcT Vi6uppk9ALKXiGmxpwpBSHoEAv2PzHsZO1/ozEyVepDfMNv/m4fxPpkLf0W6uNKtZKJO edSNqOhHxYXFl4FeOjEROXH9IOH5czDLJFSU9jZvax2sHfjdohGTB0QFmik0kVRuF4wp 1YLSC2f1HjahtrGGvlVQhdpMv+UzZpNmvc+pH3uIVB8+I8dlOJt5FFecSeRzXRBuxVOu fG3Q== X-Gm-Message-State: AO0yUKXpqae65GGDjlYjNaeVqaHKoSq+SZhV/OfvScbhBpYA8XD2utwV pCYMN/6G+slO+dXSkLsLOOnMzfC+0i0s9zfYNLE= X-Google-Smtp-Source: AK7set9XbGZlsDeqK2zPAdT5UIDc0dFEF1DCz3UoHCag+QO+Ve94qRm39/nKpv/OcGsJ7LHNS2b5Rg== X-Received: by 2002:a17:906:2581:b0:887:6c23:193f with SMTP id m1-20020a170906258100b008876c23193fmr16120228ejb.44.1676060839090; Fri, 10 Feb 2023 12:27:19 -0800 (PST) Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com. [209.85.218.54]) by smtp.gmail.com with ESMTPSA id g22-20020a170906199600b0087bd629e9e4sm2840592ejd.179.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-f54.google.com with SMTP id ml19so18987489ejb.0 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: io-uring@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