Home
last modified time | relevance | path

Searched hist:cd7f55359c90a4108e6528e326b8623fce1ad72a (Results 1 – 2 of 2) sorted by relevance

/openbmc/linux/include/linux/
H A Dtopology.hdiff cd7f55359c90a4108e6528e326b8623fce1ad72a Fri Jan 20 22:24:30 CST 2023 Yury Norov <yury.norov@gmail.com> sched: add sched_numa_find_nth_cpu()

The function finds Nth set CPU in a given cpumask starting from a given
node.

Leveraging the fact that each hop in sched_domains_numa_masks includes the
same or greater number of CPUs than the previous one, we can use binary
search on hops instead of linear walk, which makes the overall complexity
of O(log n) in terms of number of cpumask_weight() calls.

Signed-off-by: Yury Norov <yury.norov@gmail.com>
Acked-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Peter Lafreniere <peter@n8pjl.ca>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/openbmc/linux/kernel/sched/
H A Dtopology.cdiff cd7f55359c90a4108e6528e326b8623fce1ad72a Fri Jan 20 22:24:30 CST 2023 Yury Norov <yury.norov@gmail.com> sched: add sched_numa_find_nth_cpu()

The function finds Nth set CPU in a given cpumask starting from a given
node.

Leveraging the fact that each hop in sched_domains_numa_masks includes the
same or greater number of CPUs than the previous one, we can use binary
search on hops instead of linear walk, which makes the overall complexity
of O(log n) in terms of number of cpumask_weight() calls.

Signed-off-by: Yury Norov <yury.norov@gmail.com>
Acked-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Peter Lafreniere <peter@n8pjl.ca>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>