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)
Jan 6 2024, 7:12 AM
Unknown Object (File)
Jan 6 2024, 7:12 AM
Unknown Object (File)
Jan 6 2024, 7:12 AM
Unknown Object (File)
Jan 6 2024, 6:57 AM
Unknown Object (File)
Dec 27 2023, 9:09 AM
Unknown Object (File)
Dec 27 2023, 9:09 AM
Unknown Object (File)
Dec 24 2023, 1:59 AM
Unknown Object (File)
Oct 18 2023, 12:24 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.