Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Patrick Steinhardt <ps@pks.im>
Cc: Johannes Sixt <j6t@kdbg.org>,  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, 05 Aug 2026 09:36:45 -0700	[thread overview]
Message-ID: <xmqqy0ekr0bm.fsf@gitster.g> (raw)
In-Reply-To: <anL0nIk6uzkYR9Oc@pks.im> (Patrick Steinhardt's message of "Wed, 5 Aug 2026 10:30:20 +0200")

Patrick Steinhardt <ps@pks.im> writes:

> On Mon, Jul 27, 2026 at 08:44:39AM -0700, Junio C Hamano wrote:
>> Johannes Sixt <j6t@kdbg.org> writes:
>> 
>> 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".  It is harder to maintain because the application side
>> may be tempted over time to start depending on Y.  If some platforms
>> cannot easily provide an equivalent of the real function, it is
>> easier for them if the rules explicitly state from the beginning
>> that we do not require and will never require Y, needing only X and
>> Z from either the fake or real implementation.
>> 
>> At that point, we are not describing the real function anymore, so
>> your proposal to give it a specific name is one step away from that,
>> and that step is in the right direction.
>
> Yeah, I was mostly trying to follow the precedent that we currently have
> in our code base, where we assume POSIX functions and paper over any
> gaps that a specific platform has via compatibility wrappers. And I
> think that the compatibility wrapper we have for writev(3p) is close
> enough to the original semantics of it to not really matter much in
> practice.
>
> I overall don't disagree that it would've been nice at times to have a
> higher-level interface that abstracts over such platform specifics
> without assuming POSIX semantics. But I'm not really sure what it buys
> us to rename this to `write_gather()` without rethinking the bigger
> approach we have to I/O. That is, what does it buy us to now diverge
> from the current practice, and where do we want to end up?

As I am not the party who needs to implement a good enough
emulation, and what is hard to do in non POSIX environment that is
needed for writev(2) emulation, I think that is a question for j6t.

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"?

Thanks.

  reply	other threads:[~2026-08-05 16:36 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 [this message]
2026-08-05 17:55         ` Johannes Sixt
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=xmqqy0ekr0bm.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=ben.knoble@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=j6t@kdbg.org \
    --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