Messages in this thread | | | Subject | Re: [PATCH] bounds: Support non-power-of-two CONFIG_NR_CPUS | From | Rik van Riel <> | Date | Tue, 10 Oct 2023 11:19:34 -0400 |
| |
On Tue, 2023-10-10 at 15:55 +0100, Matthew Wilcox (Oracle) wrote: > ilog2() rounds down, so for example when PowerPC 85xx sets > CONFIG_NR_CPUS > to 24, we will only allocate 4 bits to store the number of CPUs > instead > of 5. Use bits_per() instead, which rounds up. Found by code > inspection. > The effect of this would probably be a misaccounting when doing NUMA > balancing, so to a user, it would only be a performance penalty. > The effects may be more wide-spread; it's hard to tell. > > Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> > Fixes: 90572890d202 ("mm: numa: Change page last {nid,pid} into > {cpu,pid}") > Cc: Peter Zijlstra <peterz@infradead.org> > Cc: Mel Gorman <mgorman@techsingularity.net> > Cc: Ingo Molnar <mingo@kernel.org> > Cc: Rik van Riel <riel@surriel.com>
Reviewed-by: Rik van Riel <riel@surriel.com>
-- All Rights Reversed.
| |