Re: [PATCH] bounds: Support non-power-of-two CONFIG_NR_CPUS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 10, 2023 at 03:55:49PM +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@xxxxxxxxxxxxx>
> Fixes: 90572890d202 ("mm: numa: Change page last {nid,pid} into {cpu,pid}")
> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> Cc: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx>
> Cc: Ingo Molnar <mingo@xxxxxxxxxx>
> Cc: Rik van Riel <riel@xxxxxxxxxxx>

Acked-by: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx>

-- 
Mel Gorman
SUSE Labs




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux