Re: [PATCH 3/3] sched/nohz: Remove weird error handling from find_new_ilb()

From: Peter Zijlstra
Date: Fri Oct 06 2023 - 06:39:31 EST


On Fri, Oct 06, 2023 at 12:25:18PM +0200, Ingo Molnar wrote:
> find_new_ilb() returns nr_cpu_ids on failure - which is a weird
> choice in itself: not only is it a global variable, it is
> a +1 out of bounds CPU index...

FWIW this is what all the cpumask bitops return when they've exhausted
the mask. Eg. no bits left set etc..