Page MenuHomeFreeBSD

Set MORETOCOME for AIO write requests on a socket.
ClosedPublic

Authored by jhb on Dec 28 2016, 5:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 10, 6:34 PM
Unknown Object (File)
Feb 5 2025, 2:55 AM
Unknown Object (File)
Jan 28 2025, 6:51 AM
Unknown Object (File)
Jan 20 2025, 9:16 PM
Unknown Object (File)
Jan 9 2025, 1:24 PM
Unknown Object (File)
Jan 5 2025, 10:42 AM
Unknown Object (File)
Jan 3 2025, 8:33 PM
Unknown Object (File)
Dec 23 2024, 11:00 AM
Subscribers

Details

Summary

Set MORETOCOME for AIO write requests on a socket.

Add a MSG_MOREOTOCOME message flag. When this flag is set, sosend*
set PRUS_MOREOTOCOME when invoking the protocol send method. The aio
worker tasks for sending on a socket set this flag when there are
additional write jobs waiting on the socket buffer.

Test Plan
  • tested nginx 1.8 using aio_write for sockets and found that when an HTTP reply was split across multiple AIO requests, the resulting data was not coalesced into MSS packets the same way as if writev() were used to write all the segments together.

Note that this is imperfect as we might set MORETOCOME and then not
send more data if the second AIO write is cancelled before it is
sent. This can happen in regular sockets if a write is interrupted
as well.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhb retitled this revision from to Set MORETOCOME for AIO write requests on a socket..
jhb updated this object.
jhb edited the test plan for this revision. (Show Details)
adrian added a reviewer: adrian.
adrian added a subscriber: adrian.

i think it's okay. The fact the lower level behaviour isn't completely defined isn't the fault of this patch :)

This revision is now accepted and ready to land.Dec 28 2016, 7:40 PM
This revision was automatically updated to reflect the committed changes.