From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 98BEE22B8CF for ; Fri, 21 Mar 2025 16:44:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742575459; cv=none; b=Xl04RSWnnef6/s2Jo3cPLL2OnG1uAwKTmhFbKZ2zMPy1a/rWvtHXCCNC3sNKgwHPWVMo9+bYxE6H84iwBtVZr2YuW29j8nBCxigbNT+rdlvicYuwlUyz0D+RlGA7gYSpTUAR0U8O/ET8wcigtsM0yXKem5bVfbjID4Zya+EHYls= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742575459; c=relaxed/simple; bh=IMeArOMSvV+SAUlYdgzoqB6lsnXPfljvOmj84MN0ick=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=MXtAGLgS0s0vkWzBRt5wK8i9Jxr4pOz3OHUEhsTLViVgt0MTCNGLoyrT+MjzIHzHA6YNEm1AMc7ycrF6vWbnyzPw8vczOjosEsGHPxUQ+SIU3Utx5t1PMevPM4SKL+IZ/nEv44oTlUiws6PatQAj2jLSJTLoV+gkDVWSj7v+8rg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=fastly.com; spf=pass smtp.mailfrom=fastly.com; dkim=pass (1024-bit key) header.d=fastly.com header.i=@fastly.com header.b=HZyv9eYa; arc=none smtp.client-ip=209.85.214.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=fastly.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fastly.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=fastly.com header.i=@fastly.com header.b="HZyv9eYa" Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-225a28a511eso49907405ad.1 for ; Fri, 21 Mar 2025 09:44:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastly.com; s=google; t=1742575457; x=1743180257; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:from:to:cc :subject:date:message-id:reply-to; bh=mdus/fJVv5Uld6yn8oFMkQzJNe6dHC2w9XvJ773goNA=; b=HZyv9eYaGfAfS5TzyiAfne7e+Cj6w6knyN1bsuK0l23BH6/C2KhX2L3GiLz0dennJB kK9slfnRaJ27l+T8IPNdM9DXo4h6Vj3Dth4GDHOzj+mBDaBhwYD0bkt3x8Lk51JO66uA pgCNI/yZ0ZQ4pfX/PqXQ5YgmYZvQHpiDE/zXA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742575457; x=1743180257; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=mdus/fJVv5Uld6yn8oFMkQzJNe6dHC2w9XvJ773goNA=; b=pgl/Br4M4Md5WJ3mt3WfknbybewshqePpOYb2JOETMf+Hen0O80F5jhdHptkxiVccj lOPxq8HBW8O5rqT0ZNysUelRDt24yyi92tzA6GreCLGscf3tImyBjDietYo5Ct7VLJkr smmFzOoRSOj5NLjkiFk7HSGUXLNvH5zRAubkWJZIvjJ+JRISzT71sizNokWGGAy1mlbT 8W20zc4vEL4bk7pIF29ma0J5jFLqYt2Cf8QNaNkpX5ccB6m4TxgSozpDXl6IAz9wIfD6 rUNofkM6JVgmpgZIPAMOePdPhcFAKCwl7+ThKnvtma5ahwcM3h2CDorb42nWww1PjLhZ f7MA== X-Forwarded-Encrypted: i=1; AJvYcCVhlXEor18bwd3mToSbOJzf9DbJViMl8xz7lpWNVgGN8IbSm4RBafTB8PiRigfx5PZeIXNpZZM=@vger.kernel.org X-Gm-Message-State: AOJu0Yzec1Vs7k2xs5Ly4uNFq7kNbtd+xD6zgJWhor/NRNeQB0GlLI9a F9NICI5B/th63Py2QdXkkhzKiP/OeXEtnvXBXk9n1L85bV9HEV4cYiKsCW3g8XU= X-Gm-Gg: ASbGncuQMJjq7iZ7g54XuF8A7J90FZZ5444BtS88OVnQ26Il5OVFQglz/30boN99Qq3 eL8rlsdMvX2DWUectSkUUFu55xXWBE84l6mxdzxbdDel7yR4b1MnOVFULBpU3EDsbV+NYJoP1fn 8FeSfLaFS8W1xRQt0TW5RPf2Rq3iITdSBAwpfo07lOCI0UuIxvSReZu+RAV801l0L8zXi7q046/ b/tW7E6ef8csKDkK8n34oX09IzRvEjKMu4T1gkUZYzHuEUNTn15ATzOcAvpO1A/NDLxqprOqBB4 6awJVFhTIX6dtXppVvCegIhiYkQ3vKU8uHqYj7NkYZuyFpE6LosUQNa5W/Wa3duHMABjUrrl0eo 8XSHXZGDQxRuAwAKP X-Google-Smtp-Source: AGHT+IHNkHo8pQiFISfzkg8EmthIVkGNH6DyH204b4LoCrS28DjOE/rXN+w3HTspHp5hcO8dxdqoWw== X-Received: by 2002:a05:6a21:998b:b0:1f5:839e:ece8 with SMTP id adf61e73a8af0-1fe42f090e7mr7044509637.2.1742575456784; Fri, 21 Mar 2025 09:44:16 -0700 (PDT) Received: from LQ3V64L9R2 (c-24-6-151-244.hsd1.ca.comcast.net. [24.6.151.244]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af8a2843af9sm1984943a12.38.2025.03.21.09.44.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Mar 2025 09:44:16 -0700 (PDT) Date: Fri, 21 Mar 2025 09:44:12 -0700 From: Joe Damato To: Christoph Hellwig Cc: Jens Axboe , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, asml.silence@gmail.com, linux-fsdevel@vger.kernel.org, edumazet@google.com, pabeni@redhat.com, horms@kernel.org, linux-api@vger.kernel.org, linux-arch@vger.kernel.org, viro@zeniv.linux.org.uk, jack@suse.cz, kuba@kernel.org, shuah@kernel.org, sdf@fomichev.me, mingo@redhat.com, arnd@arndb.de, brauner@kernel.org, akpm@linux-foundation.org, tglx@linutronix.de, jolsa@kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [RFC -next 00/10] Add ZC notifications to splice and sendfile Message-ID: Mail-Followup-To: Joe Damato , Christoph Hellwig , Jens Axboe , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, asml.silence@gmail.com, linux-fsdevel@vger.kernel.org, edumazet@google.com, pabeni@redhat.com, horms@kernel.org, linux-api@vger.kernel.org, linux-arch@vger.kernel.org, viro@zeniv.linux.org.uk, jack@suse.cz, kuba@kernel.org, shuah@kernel.org, sdf@fomichev.me, mingo@redhat.com, arnd@arndb.de, brauner@kernel.org, akpm@linux-foundation.org, tglx@linutronix.de, jolsa@kernel.org, linux-kselftest@vger.kernel.org References: <20250319001521.53249-1-jdamato@fastly.com> <2d68bc91-c22c-4b48-a06d-fa9ec06dfb25@kernel.dk> <19e3056c-2f7b-4f41-9c40-98955c4a9ed3@kernel.dk> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Mar 20, 2025 at 10:56:15PM -0700, Christoph Hellwig wrote: > On Thu, Mar 20, 2025 at 11:23:57AM -0700, Joe Damato wrote: > > In my other message to Jens I proposed: > > - SPLICE_F_ZC for splice to generate zc completion notifications > > to the error queue > > - Modifying sendfile so that if SO_ZEROCOPY (which already exists) > > is set on a network socket, zc completion notifications are > > generated. > > > > In both cases no new system call is needed and both splice and > > sendfile become safer to use. > > > > At some point in the future a mechanism built on top of iouring > > introduced as new system calls (sendmsg2, sendfile2, splice2, etc) > > can be built. > > I strongly disagree with this. This is spreading the broken > SO_ZEROCOPY to futher places outside the pure networking realm. Don't > do that. OK. I won't proceed down that path. Thank you for the feedback. > > > Because sendmsg should never have done that it certainly should not > > > spread beyond purely socket specific syscalls. > > > > I don't know the entire historical context, but I presume sendmsg > > did that because there was no other mechanism at the time. > > At least aio had been around for about 15 years at the point, but > networking folks tend to be pretty insular and reinvent things. Sorry, but whatever issue there is between networking and other folks is well beyond my understanding and historical context. I'm not a reviewer or maintainer or anything like that; I'm just a developer who saw a problem and wanted a solution. I've read your message loud and clear, though, and I won't proceed down the path I've proposed. I appreciate your feedback; this is precisely why I sent the RFC - to get comments - so thank you for taking a look and letting me know. > > As mentioned above and in other messages, it seems like it is > > possible to improve the networking parts of splice (and therefore > > sendfile) to make them safer to use without introducing a new system > > call. > > > > Are you saying that you are against doing that, even if the code is > > network specific (but lives in fs/)? > > Yes. > > Please take the work and integrate it with the kiocb-based system > we use for all other in-kernel I/O that needs completion notifications > and which makes it trivial to integate with io_uring instead of > spreading an imcompatible and inferior event system. If you have any suggestions or pointers to code I should look at for inspiration I would very much appreciate the guidance. Thanks for your time and energy in reviewing my RFC and responding. - Joe