Add SO_INCOMING_CPU support to net.sock_option_flag_in#11366
Merged
masaori335 merged 2 commits intoapache:masterfrom Jun 9, 2024
Merged
Add SO_INCOMING_CPU support to net.sock_option_flag_in#11366masaori335 merged 2 commits intoapache:masterfrom
masaori335 merged 2 commits intoapache:masterfrom
Conversation
1c27b6e to
32217f8
Compare
masaori335
commented
May 20, 2024
| EThread *ethread = this_ethread(); | ||
|
|
||
| #ifdef TS_USE_HWLOC | ||
| cpu = ethread->hwloc_obj->os_index; |
Contributor
Author
There was a problem hiding this comment.
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
bryancall
approved these changes
Jun 7, 2024
Contributor
Author
|
@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. |
Contributor
|
Cherry-picked to v10.0.x |
cmcfarlen
pushed a commit
that referenced
this pull request
Jun 10, 2024
* Add SO_INCOMING_CPU support to net.sock_option_flag_in * Fix FreeBSD Build (cherry picked from commit 266b666)
masaori335
added a commit
to masaori335/trafficserver
that referenced
this pull request
Dec 10, 2024
…e#779) * Add SO_INCOMING_CPU support to net.sock_option_flag_in (apache#11366) * Add SO_INCOMING_CPU support to net.sock_option_flag_in * Fix FreeBSD Build (cherry picked from commit 266b666) Conflicts: include/iocore/net/NetVCOptions.h iocore/eventsystem/I_EThread.h iocore/net/Connection.cc * Fix building without HWLOC (apache#11435) Fixes apache#11434. (cherry picked from commit 44a41cb) --------- Co-authored-by: Masaori Koshiba <masaori@apache.org> Co-authored-by: JosiahWI <41302989+JosiahWI@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Address #5165.
Add a option (128) for
SO_INCOMING_CPUto 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