Page MenuHomeFreeBSD

rpc: limited multithread support for svc_nl
ClosedPublic

Authored by glebius on Jan 20 2025, 9:13 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 13, 4:02 PM
Unknown Object (File)
Sun, Apr 6, 1:06 PM
Unknown Object (File)
Mar 15 2025, 2:25 AM
Unknown Object (File)
Mar 3 2025, 3:57 PM
Unknown Object (File)
Feb 10 2025, 2:27 AM
Unknown Object (File)
Feb 2 2025, 9:07 PM
Unknown Object (File)
Feb 2 2025, 4:11 PM
Unknown Object (File)
Feb 1 2025, 7:14 PM
Subscribers

Details

Summary

The rpc(3) itself was not designed with multithreading in mind, but we can
actually achieve some parallelism without modifying the library and the
framework. This transport will allow to process RPCs in threads, with
some hacks on the application side (documented in code). We make
reentrable only one method - SVC_REPLY(). Reading and parsing of incoming
calls is still done synchronously. But the actual processing of the calls
can be offloaded to a thread, and once finished the thread can safely
execute SVC_REPLY() and the reply would be sent with the correct xid.

Diff Detail

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

Event Timeline

Update with respect to committed changes and snl(3) as well as unstacked
changes to snl(3).

Looks ok to me but I do not know pthreads.

This revision was not accepted when it landed; it landed in state Needs Review.Feb 1 2025, 9:04 AM
This revision was automatically updated to reflect the committed changes.