Git development
 help / color / mirror / Atom feed
From: Johannes Sixt <j6t@kdbg.org>
To: Junio C Hamano <gitster@pobox.com>, Patrick Steinhardt <ps@pks.im>
Cc: Ben Knoble <ben.knoble@gmail.com>, Jeff King <peff@peff.net>,
	"brian m. carlson" <sandals@crustytoothpaste.net>,
	"Randall S. Becker" <randall.becker@nexbridge.ca>,
	Phillip Wood <phillip.wood@dunelm.org.uk>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	git@vger.kernel.org
Subject: Re: [PATCH 0/5] Reintroduce writev(3p)
Date: Wed, 5 Aug 2026 19:55:30 +0200	[thread overview]
Message-ID: <2952d9a7-c7c0-44c0-a321-7ddad6497a6e@kdbg.org> (raw)
In-Reply-To: <xmqqy0ekr0bm.fsf@gitster.g>

Am 05.08.26 um 18:36 schrieb Junio C Hamano:
>>> I think Patrick's writev(2) follows the pattern our previous compat/
>>> routines have taken.  We use real writev(2) where it is available,
>>> and in the fake implementations in compat/ we have comments that
>>> essentially say "the real function offers X, Y, and Z, but we only
>>> want X and Z and do not need Y, so this implementation does not
>>> support Y".

> A different way to put the same question is "what is Y in the
> context of the intended uses of writev(2) in our codebase"?
The Y that I am thinking of primarily is the atomicity guarantee:

> The  data transfers performed by readv() and writev() are atomic: the
> data written by writev() is written as a single block that is not
> intermingled with output from writes in  other  processes; [...]

(See `man 2 writev`; this isn't spelled out explicitly in the Open Group
Base Specification.)

This is basically unimplementable by any emulation that has to call
write() multiple times.

-- Hannes


  reply	other threads:[~2026-08-05 17:55 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-16  7:52 [PATCH 0/5] Reintroduce writev(3p) Patrick Steinhardt
2026-07-16  7:52 ` [PATCH 1/5] compat/posix: introduce writev(3p) wrapper Patrick Steinhardt
2026-07-16  8:47   ` Simon Richter
2026-07-16 20:09     ` Junio C Hamano
2026-07-16 20:44       ` Junio C Hamano
2026-08-05  8:30         ` Patrick Steinhardt
2026-07-16  7:52 ` [PATCH 2/5] wrapper: introduce writev(3p) wrappers Patrick Steinhardt
2026-07-16  7:52 ` [PATCH 3/5] wrapper: properly handle MAX_IO_SIZE in writev(3p) Patrick Steinhardt
2026-07-16  7:52 ` [PATCH 4/5] sideband: use writev(3p) to send pktlines Patrick Steinhardt
2026-07-16  7:52 ` [PATCH 5/5] fast-import: use writev(3p) to send cat-blob responses Patrick Steinhardt
2026-07-16 18:56 ` [PATCH 0/5] Reintroduce writev(3p) Johannes Sixt
2026-07-27 15:44   ` Junio C Hamano
2026-08-05  8:30     ` Patrick Steinhardt
2026-08-05 16:36       ` Junio C Hamano
2026-08-05 17:55         ` Johannes Sixt [this message]
2026-08-05 18:40           ` Junio C Hamano
2026-08-05 20:00             ` Johannes Sixt
2026-08-05 20:29               ` Junio C Hamano
2026-08-06  6:28                 ` Patrick Steinhardt
2026-08-06 20:26                   ` Junio C Hamano
2026-08-07  6:29                     ` Patrick Steinhardt
2026-08-07  6:18 ` [PATCH v2 " Patrick Steinhardt
2026-08-07  6:18   ` [PATCH v2 1/5] compat/posix: introduce writev(3p) wrapper Patrick Steinhardt
2026-08-07  6:18   ` [PATCH v2 2/5] wrapper: introduce writev(3p) wrappers Patrick Steinhardt
2026-08-07  6:18   ` [PATCH v2 3/5] wrapper: properly handle MAX_IO_SIZE in writev(3p) Patrick Steinhardt
2026-08-07  6:18   ` [PATCH v2 4/5] sideband: use writev(3p) to send pktlines Patrick Steinhardt
2026-08-07  6:18   ` [PATCH v2 5/5] fast-import: use writev(3p) to send cat-blob responses Patrick Steinhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2952d9a7-c7c0-44c0-a321-7ddad6497a6e@kdbg.org \
    --to=j6t@kdbg.org \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=ben.knoble@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    --cc=phillip.wood@dunelm.org.uk \
    --cc=ps@pks.im \
    --cc=randall.becker@nexbridge.ca \
    --cc=sandals@crustytoothpaste.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox