git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Git 2.54.0-rc1, subtests of t5310, t5326, t5327

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Apr 9, 2026, 00:20 UTC
Message-ID
<adbwyvQ-R2Ag1vox@fruit.crustytoothpaste.net>
In-Reply-To
<20260408223233.GB2873736@coredump.intra.peff.net>
On 2026-04-08 at 22:32:33, Jeff King wrote:
Show 12 quoted lines
> I think writev() is buying us something when it works (it is hlving the
> number of writes for sideband packets). And it works when either:
> 
>   1. the platform is OK with writing up to 64k in a single writev()
> 
>   2. the platform has a limit that is small (like NonStop here), but
>      writes less than MAX_IO_SIZE work and will save a write() call
> 
> If we just care about (1), then the right solution is to declare that
> writev() isn't fully functional for us on some platforms, and they
> should build with NO_WRITEV. And we should probably embed that in
> config.mak.uname.

Looking at POSIX, there doesn't seem to be any constraints on the size of individual vectors other than that they must total to less than SSIZE_MAX. iovcnt can be limited to 16, but I don't think we're hitting that here. POSIX does say that SSIZE_MAX does not need to exceed 32767, which may be what's going on here, although that does seem like an unreasonable value for a real system. Linux, FreeBSD, and NetBSD all set SSIZE_MAX to either INT_MAX or LONG_MAX.

I also think that 64 KiB is more than reasonable in terms of the size that people should be able to send. I'd personally expect to be able to send values much larger, at least 512 KiB, and I have code that expects even larger (16 MiB).

So I'd simply say that for systems that have a constraint on the size that is "too small", they should just use NO_WRITEV.

However, I don't have a strong opinion on this and if people want to do the proposal for option 2, that's fine with me.

I will say that we may find ourselves in a pickle with Rust code in the future if we use `write_vectored` since that will probably just use the OS implementation, but we can worry about that when we get there.

-- 
brian m. carlson (they/them)
Toronto, Ontario, CA
Previous: Jeff KingNext: Patrick Steinhardt
Message 16 of 29 in “Git 2.54.0-rc1, subtests of t5310, t5326, t5327”
  1. rsbecker@nexbridge.comApr 7, 2026
  2. Jeff KingApr 8, 2026
  3. rsbecker@nexbridge.comApr 8, 2026
  4. rsbecker@nexbridge.comApr 8, 2026
  5. Jeff KingApr 8, 2026
  6. Junio C HamanoApr 8, 2026
  7. rsbecker@nexbridge.comApr 8, 2026
  8. Junio C HamanoApr 8, 2026
  9. rsbecker@nexbridge.comApr 8, 2026
  10. Junio C HamanoApr 8, 2026
  11. rsbecker@nexbridge.comApr 8, 2026
  12. Junio C HamanoApr 8, 2026
  13. Junio C HamanoApr 8, 2026
  14. rsbecker@nexbridge.comApr 8, 2026
  15. Jeff KingApr 8, 2026
  16. brian m. carlsonApr 9, 2026
  17. Patrick SteinhardtApr 9, 2026
  18. Phillip WoodApr 9, 2026
  19. Patrick SteinhardtApr 9, 2026
  20. rsbecker@nexbridge.comApr 9, 2026
  21. Jeff KingApr 9, 2026
  22. rsbecker@nexbridge.comApr 9, 2026
  23. Jeff KingApr 9, 2026
  24. Patrick SteinhardtApr 10, 2026
  25. Jeff KingApr 9, 2026
  26. Johannes SixtApr 10, 2026
  27. rsbecker@nexbridge.comApr 8, 2026
  28. Jeff KingApr 8, 2026
  29. Jeff KingApr 8, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.