-
Notifications
You must be signed in to change notification settings - Fork 780
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add SO_INCOMING_CPU support to net.sock_option_flag_in #11366
Add SO_INCOMING_CPU support to net.sock_option_flag_in #11366
Conversation
1c27b6e
to
32217f8
Compare
EThread *ethread = this_ethread(); | ||
|
||
#ifdef TS_USE_HWLOC | ||
cpu = ethread->hwloc_obj->os_index; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hwloc_obj::os_index
looks "OS-provided physical index number" and it's working with exec_thread.affinity: 4
as expected. However, hwloc has any better API?
https://github.com/open-mpi/hwloc/blob/63a8288d31a1baf67a909466aba9a022c78ca7b1/include/hwloc.h#L491
13e9467
to
348f03d
Compare
@cmcfarlen I'd request to 10.0.x backport. But, this is a new feature, so we can wait for 10.1.x, if you want. |
Cherry-picked to v10.0.x |
* Add SO_INCOMING_CPU support to net.sock_option_flag_in * Fix FreeBSD Build (cherry picked from commit 266b666)
Address #5165.
Add a option (128) for
SO_INCOMING_CPU
to theproxy.config.net.sock_option_flag_in
.Background
There was a bug with SO_REUSEPORT since v4.6. But it's fixed by v6.2 and some distros backported it.
Now we can use SO_INCOMING_CPU, SO_REUSEPORT and CPU Affinity 4 for perfect locality.
torvalds/linux@b261eda
Ref.
https://www.man7.org/linux/man-pages/man7/socket.7.html