EF_FDS_MT_SAFE

Onload User Guide (UG1586)

Document ID
UG1586
Release Date
2023-07-31
Revision
1.2 English
Name
fds_mt_safe
Default
1
Minimum
0
Maximum
1
Scope
per-process

This option allows less strict concurrency control when accessing the user-level file descriptor table, resulting in increased performance, particularly for multi-threaded applications. Single-threaded applications get a small latency benefit, but multi-threaded applications benefit most due to decreased cache-line bouncing between CPU cores.

This option is unsafe for applications that make changes to file descriptors in one thread while accessing the same file descriptors in other threads. For example, closing a file descriptor in one thread while invoking another system call on that file descriptor in a second thread. Concurrent calls that do not change the object underlying the file descriptor remain safe.

Calls to bind(), connect(), listen() can change the underlying object. If you call such functions in one thread while accessing the same file descriptor from the other thread, this option is also unsafe. In some special cases, any functions may change the underlying object.

Also concurrent calls might happen from signal handlers, so set this to 0 if your signal handlers call bind(), connect(), listen() or close()