Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

memblock: allow zero threshold in validate_numa_converage()

Currently memblock validate_numa_converage() returns false negative when
threshold set to zero.

Make the check if the memory size with invalid node ID is greater than
the threshold exclusive to fix that.

Link: https://lore.kernel.org/all/Z0mIDBD4KLyxyOCm@kernel.org/
Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>

+2 -2
+2 -2
mm/memblock.c
··· 735 735 /** 736 736 * memblock_validate_numa_coverage - check if amount of memory with 737 737 * no node ID assigned is less than a threshold 738 - * @threshold_bytes: maximal number of pages that can have unassigned node 738 + * @threshold_bytes: maximal memory size that can have unassigned node 739 739 * ID (in bytes). 740 740 * 741 741 * A buggy firmware may report memory that does not belong to any node. ··· 755 755 nr_pages += end_pfn - start_pfn; 756 756 } 757 757 758 - if ((nr_pages << PAGE_SHIFT) >= threshold_bytes) { 758 + if ((nr_pages << PAGE_SHIFT) > threshold_bytes) { 759 759 mem_size_mb = memblock_phys_mem_size() >> 20; 760 760 pr_err("NUMA: no nodes coverage for %luMB of %luMB RAM\n", 761 761 (nr_pages << PAGE_SHIFT) >> 20, mem_size_mb);