Page MenuHomeFreeBSD

sockets: retire sorflush()
ClosedPublic

Authored by glebius on Jan 12 2024, 10:08 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 21, 11:14 PM
Unknown Object (File)
Mon, Oct 21, 11:14 PM
Unknown Object (File)
Sat, Oct 19, 6:48 PM
Unknown Object (File)
Sat, Oct 19, 5:58 PM
Unknown Object (File)
Sep 9 2024, 9:47 AM
Unknown Object (File)
Sep 2 2024, 12:52 PM
Unknown Object (File)
Sep 1 2024, 6:52 AM
Unknown Object (File)
Aug 30 2024, 1:08 PM
Subscribers

Details

Summary

With removal of dom_dispose method the function boils down to two
meaningful function calls: socantrcvmore() and sbrelease(). The latter is
only relevant for protocols that use generic socket buffers.

The socket I/O sx(9) lock acquisition in sorflush() is not relevant for
shutdown(2) operation as it doesn't do any I/O that may interleave with
read(2) or write(2). The socket buffer mutex acquisition inside
sbrelease() is what guarantees thread safety. This sx(9) acquisition in
soshutdown() can be tracked down to 4.4BSD times, where it used to be
sblock(), and it was carried over through the years evolving together with
sockets with no reconsideration of why do we carry it over. I can't tell
if that sblock() made sense back then, but it doesn't make any today.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable