Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp2288319ybx; Sat, 2 Nov 2019 16:13:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqzez/YJAVUR1EyvU+1hVuaVK3NZp2th3Lfbnvy78lazv8+wbYfzYhfUMlAFYGlD5pzxgVZe X-Received: by 2002:a50:c20a:: with SMTP id n10mr2831406edf.120.1572736391876; Sat, 02 Nov 2019 16:13:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572736391; cv=none; d=google.com; s=arc-20160816; b=m9Oj6jNXM8n2IqwkfojOrMCkBHp9xmd5SMjpMvvD2x1AZah//fHUQ8WZzpWccgXFGG QFHB8sZG+DKNWfkDpRyQa8sj7AwsZJGxxsjMG2G5UQrqp9MRwkIOKxbQo+J4JgDh2ZI2 QLPd8Z4cAvOdvy76IEVNm5MUM+78fcHtAI875zBHN7s8cu3jSkZMaF3FBPCOodKzHMre dOvw3mHqtVuEr3XcU7uTZrnBVQmhfLXNuFfnCTGTf7pIGYZo9cWFazG+un8S8MoWCUGA yM5BG0UskiLMG15x6Bw0KsThuJFltZTqeV/LFmQ/8zuyU5pnHHTREeqz3CBg6XBsxy9H BZ3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Uh8/ql1swcZ/RLJ8zkeObExj1w6DyGVNWtfZIlFMpeo=; b=Min9DxXBXV6TnaTqvE6eAOpNgZeQrguEVK1ZWPaXDc8l7kZ0gTn800pyS3+4yE8DeL Jg9ffCNFMa9wt81VwUm3iQdNQ/PyYkrR/f4hwRYpC8igxFI+k4h8svLf0QkdgK9dnA4x ogc/WL7L03M+OlYIPYDEW2Ms4jEIUeYQ46IB/tyQjSHQliRGJxWql+sUcA+sKkW1mYJN t+X0ruPhVdFbEB/1LLAprV0nmr4Dw8/AH61iQdCxgW9jy1l6FCekkjoiaeAXlUda9nef NrI2XNU4e4d9QiCYexRYl3sT9gAc1FHkgBJBY0RZIQD3IDicraW9c1xz7tpp8hjsS34a s7YA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Vx52JGJ2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x12si4254268edi.301.2019.11.02.16.12.48; Sat, 02 Nov 2019 16:13:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Vx52JGJ2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727406AbfKBXKR (ORCPT + 99 others); Sat, 2 Nov 2019 19:10:17 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:38929 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727367AbfKBXKQ (ORCPT ); Sat, 2 Nov 2019 19:10:16 -0400 Received: by mail-lf1-f66.google.com with SMTP id 195so9618890lfj.6 for ; Sat, 02 Nov 2019 16:10:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Uh8/ql1swcZ/RLJ8zkeObExj1w6DyGVNWtfZIlFMpeo=; b=Vx52JGJ2fL2ca9BB2NXhwTThadLFJNdykQ5Qc2uEp2vn5uwNFrfyadC6EXLjhvKklV KXMcjJQrv3h80vcy/cZZjfo/5qqKgj2fI2pWR4TA74i3RLzoy9MP14q5tRVf25F8gLLb ceXpd5ICYbOD7PSidUN5wWZK5ccyx9qRkG23Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Uh8/ql1swcZ/RLJ8zkeObExj1w6DyGVNWtfZIlFMpeo=; b=egQqw9fSG2w08MLVsY4QrOzAdqo3/t7J/nnyD1vTESE64cCnMHF/ZH7h3CIPgZ3oMd jytIxJNm7TePY+iDh2XRscIIg9IzwIddo1BzkNbC46cvGU73TvyTRNdF/zlgz7OU67ID WVVnC3SaormNroDVJzSASSLUmD6kiS4IsYVYT7rzb9R1LxqZUWOBKwxsOmZWgoYqT208 v6OPvsx6wSl0Pir6K6hVtu98RLXhV54k14ivoa+wBUJbeZ8rOOwLDtY3awV4KcRI+Xvr 1EwzF+uPDMOpDTrCJ1jn31jmH1UCgBhaLVKRqniJWdfcsBV6WoQeW/tv90w/zBpoemGf bB9Q== X-Gm-Message-State: APjAAAXbhpMdWspj/VNiihknpkcIN5GQNaCoFOfDHIxP+Gu85blwLHmg +LNFPK4xvBL7tNK0FcWhffrECzvxWRE= X-Received: by 2002:a19:655b:: with SMTP id c27mr11791144lfj.122.1572736212976; Sat, 02 Nov 2019 16:10:12 -0700 (PDT) Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com. [209.85.208.182]) by smtp.gmail.com with ESMTPSA id e26sm4193246ljj.76.2019.11.02.16.10.11 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 02 Nov 2019 16:10:11 -0700 (PDT) Received: by mail-lj1-f182.google.com with SMTP id y23so13362926ljc.5 for ; Sat, 02 Nov 2019 16:10:11 -0700 (PDT) X-Received: by 2002:a2e:8919:: with SMTP id d25mr1543119lji.97.1572736211179; Sat, 02 Nov 2019 16:10:11 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Linus Torvalds Date: Sat, 2 Nov 2019 16:09:55 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH 11/10] pipe: Add fsync() support [ver #2] To: Andy Lutomirski Cc: David Howells , Konstantin Khlebnikov , Rasmus Villemoes , Greg Kroah-Hartman , Peter Zijlstra , Nicolas Dichtel , raven@themaw.net, Christian Brauner , keyrings@vger.kernel.org, linux-usb@vger.kernel.org, linux-block , LSM List , linux-fsdevel , Linux API , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Nov 2, 2019 at 4:02 PM Linus Torvalds wrote: > > But I don't think anybody actually _did_ any of that. But that's > basically the argument for the three splice operations: > write/vmsplice/splice(). Which one you use depends on the lifetime and > the source of your data. write() is obviously for the copy case (the > source data might not be stable), while splice() is for the "data from > another source", and vmsplace() is "data is from stable data in my > vm". Btw, it's really worth noting that "splice()" and friends are from a more happy-go-lucky time when we were experimenting with new interfaces, and in a day and age when people thought that interfaces like "sendpage()" and zero-copy and playing games with the VM was a great thing to do. It turns out that VM games are almost always more expensive than just copying the data in the first place, but hey, people didn't know that, and zero-copy was seen a big deal. The reality is that almost nobody uses splice and vmsplice at all, and they have been a much bigger headache than they are worth. If I could go back in time and not do them, I would. But there have been a few very special uses that seem to actually like the interfaces. But it's entirely possible that we should kill vmsplice() (likely by just implementing the semantics as "write()") because it's not common enough to have the complexity. Linus