Commit 5f29551
smp: Improve locality in smp_call_function_any()
smp_call_function_any() tries to make a local call as it's the cheapest
option, or switches to a CPU in the same node. If it's not possible, the
algorithm gives up and searches for any CPU, in a numerical order.
Instead, it can search for the best CPU based on NUMA locality, including
the 2nd nearest hop (a set of equidistant nodes), and higher.
sched_numa_find_nth_cpu() does exactly that, and also helps to drop most
of the housekeeping code.
Signed-off-by: Yury Norov [NVIDIA] <yury.norov@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20250623000010.10124-2-yury.norov@gmail.com1 parent 09735f0 commit 5f29551
1 file changed
Lines changed: 3 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
741 | 741 | | |
742 | 742 | | |
743 | 743 | | |
744 | | - | |
745 | | - | |
| 744 | + | |
746 | 745 | | |
747 | 746 | | |
748 | 747 | | |
749 | 748 | | |
750 | 749 | | |
751 | | - | |
752 | 750 | | |
753 | 751 | | |
754 | 752 | | |
755 | 753 | | |
756 | | - | |
757 | | - | |
758 | | - | |
759 | | - | |
760 | | - | |
761 | | - | |
762 | | - | |
763 | | - | |
764 | | - | |
765 | | - | |
| 754 | + | |
| 755 | + | |
766 | 756 | | |
767 | | - | |
768 | | - | |
769 | | - | |
770 | 757 | | |
771 | 758 | | |
772 | 759 | | |
| |||
0 commit comments