Open zeeke opened 3 days ago
Just one concurrency related comment, but otherwise the logic looks good to me. I would add the bug id to the title, but I see OVN-k is not following that pattern.
Just one concurrency related comment, but otherwise the logic looks good to me. I would add the bug id to the title, but I see OVN-k is not following that pattern.
Yes, I'll take care of linking the issue when this fix lands downstream
/lgtm Thanks, @zeeke!
OVS CPU pinning ensures the CPU consumed by the processes
ovsdb-server
andovs-vswitchd
are the same as the OVNkube container.ovs-vswitchd
process has threads and callingSchedSetaffinity()
on the main PID only does not guarantee that the already spawned threads inherit that affinity. The following is an example of such a situation:This changes makes the CPU align routine loop over all the threads of the given PID and invoke
SchedSetaffinity
on all of them.To test these changes, a simple
sleep 10
process is not enough, as it doesn't spawn any thread. A go version of the sleep is therefore provided for testing purpose, in the form of a simplemain
.What this PR does and why is it needed
Which issue(s) this PR fixes
Special notes for reviewers
How to verify it
Details to documentation updates
Description for the changelog
Does this PR introduce a user-facing change?
cc @MarSik, @ricky-rav