socket.7: Minor tweaks

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2017-02-19 08:52:07 +01:00
parent ca1969e92b
commit b7f97e8ea5
1 changed files with 9 additions and 8 deletions

View File

@ -490,11 +490,12 @@ flag on a socket
operation.
Expects an integer boolean flag.
.TP
.BR SO_INCOMING_CPU " (getsockopt since Linux 3.19, setsockopt since Linux 4.4)"
.\" getsocktop 2c8c56e15df3d4c2af3d656e44feb18789f75837
.\" setsocktop 70da268b569d32a9fddeea85dc18043de9d89f89
Sets or gets the cpu affinity of a socket. Expects an integer flag.
.sp
.BR SO_INCOMING_CPU " (gettable since Linux 3.19, settable since Linux 4.4)"
.\" getsockopt 2c8c56e15df3d4c2af3d656e44feb18789f75837
.\" setsockopt 70da268b569d32a9fddeea85dc18043de9d89f89
Sets or gets the CPU affinity of a socket.
Expects an integer flag.
.in +4n
.nf
int cpu = 1;
@ -502,10 +503,10 @@ socklen_t len = sizeof(cpu);
setsockopt(fd, SOL_SOCKET, SO_INCOMING_CPU, &cpu, &len);
.fi
.in
.sp
The typical use case is one listener per RX queue, as the associated listener
should only accept flows handled in softirq by the same cpu. This provides
optimal NUMA behavior and keep cpu caches hot.
should accept only flows handled in softirq by the same CPU.
This provides optimal NUMA behavior and keeps CPU caches hot.
.TP
.B SO_KEEPALIVE
Enable sending of keep-alive messages on connection-oriented sockets.