From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-b2-smtp.messagingengine.com (fhigh-b2-smtp.messagingengine.com [202.12.124.153]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6CAD33DA7F1 for ; Thu, 6 Aug 2026 06:28:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.153 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785997739; cv=none; b=EXSaSB9zGScO3UQvaCQnm12sc+rH4RY2m2C+epJgUQwXorXPoV+6BsI6b36B06cGmeDN57ZJ2efYKT7GtEtOAn6Nux5W2hZkJkSZR1lrqyjenYVmYtlEbWauXEKTUslKo05+3VeZq7gnXpz/jY9qAmqQFUP2KpBGeGzDhijLNBA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785997739; c=relaxed/simple; bh=WmMjzSqNJOMQjnZ8UO0eEcnq6yWkyfGBwkK+XkeG7lE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=W9mXWLBMdVdDvKR/LagQCw/Ad76G+MDh9XFOi1PXbeNeFxd66wZf4EGTPrd/Uz8HTlukjr/ElzT4hoX7sJktFpSVMRhZW4VuW40JPNtxogMfiQIT6tTYkDeLpEzYfbAJ9Iw0giCvRsHCc6mdFI2mqbqx5bAtnAZVnVxeu+/J6S8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=R9NwcfMm; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=DVayBoEg; arc=none smtp.client-ip=202.12.124.153 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="R9NwcfMm"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="DVayBoEg" Received: from phl-compute-11.internal (phl-compute-11.internal [10.202.2.51]) by mailfhigh.stl.internal (Postfix) with ESMTP id 971B07A016C; Thu, 6 Aug 2026 02:28:57 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-11.internal (MEProxy); Thu, 06 Aug 2026 02:28:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1785997737; x=1786084137; bh=aiZw7Fsafm 2vKxXLmiyl9wIXubtICqyzydjc1V/OnII=; b=R9NwcfMm4eZIG1ddV5W0HF5mDX cHJW+IsI61yvWRsSFOGokVF3iWz3rl2qDELktftih/5d7Xr/1r81D2Xo1Nn6XGRw Fr05x7JM1Y8cYhELDjCAbjwvwgg3K5PoCwhjM3yXAtYwGZZ4L9UF8kEz8q8E5nM9 FQ0SiACZymAvQbvUYKrq1wLMr6cnO+xdXo1kg3HTyj78vKcsoguizg9PNmQbdKfn tL+zrBtFmV+TLNLtHDrBN6eD5ta2hcPUxzI84A7bLMECEcko7b8Y+BqaRD2MqYSn ofi5IlpgTWqH/OXaBox6FWWjyA3JRsSeSrdmQ+eGq/OTd5t7+JbDjX3ZAdMQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1785997737; x=1786084137; bh=a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B8Gr1WKDSFMH4Cfbp32F5cQ9o4hJyN87Qe1oKfg X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 6 Aug 2026 02:28:55 -0400 (EDT) Received: by mail (OpenSMTPD) with ESMTPSA id d792802c (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 6 Aug 2026 06:28:53 +0000 (UTC) Date: Thu, 6 Aug 2026 08:28:50 +0200 From: Patrick Steinhardt To: Junio C Hamano Cc: Johannes Sixt , Ben Knoble , Jeff King , "brian m. carlson" , "Randall S. Becker" , Phillip Wood , Johannes Schindelin , git@vger.kernel.org Subject: Re: [PATCH 0/5] Reintroduce writev(3p) Message-ID: References: <20260716-pks-reintroduce-writev-v1-0-ea9038c884bc@pks.im> <2952d9a7-c7c0-44c0-a321-7ddad6497a6e@kdbg.org> <8ff3c3ea-2604-4d65-8a7d-6acd6218b7c2@kdbg.org> Precedence: bulk X-Mailing-List: git@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 Wed, Aug 05, 2026 at 01:29:44PM -0700, Junio C Hamano wrote: > Johannes Sixt writes: > > > Am 05.08.26 um 20:40 schrieb Junio C Hamano: > >> I think it is OK to explicitly document that any writev(2) emulation > >> is allowed to be non-atomic, and it is also OK to declare that using > >> writev(2) in this application to allow competing writes to the same > >> destination is a bug. > > > > These are fine. > > > > But I'm not worried about current uses of writev, I'm worried about > > future uses: "Look, we already use writev elsewhere. Let's use it here, > > too, where we can take adavantage of the atomicity of the write." It's > > too easy to miss a note about non-atomic emulations when the function > > name advertises more than can be guaranteed. For this reason, I strongly > > suggest to use a different name. > > That is why I added the "it is also OK to declare" in the above. We could of course trivially restore the non-interleaving property by only ever writing the first iovec. POSIX doesn't guarantee that the full iovec is being written, and write(3p) is already non-interleaving. It wouldn't even be less efficient compared to the current implementation, as we have to loop around write(3p) anyway in our compatibility wrapper. Patrick