lkml.org 
[lkml]   [2023]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] bounds: Support non-power-of-two CONFIG_NR_CPUS
From
Date
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.

\
 
 \ /
  Last update: 2023-10-10 17:20    [W:0.060 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site