Patch "memblock: allow zero threshold in validate_numa_converage()" has been added to the 6.6-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    memblock: allow zero threshold in validate_numa_converage()

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     memblock-allow-zero-threshold-in-validate_numa_conve.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 941ae9f40f17bb4178fc34ce43def7359e99afe1
Author: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>
Date:   Fri Nov 29 11:13:47 2024 +0200

    memblock: allow zero threshold in validate_numa_converage()
    
    [ Upstream commit 9cdc6423acb49055efb444ecd895d853a70ef931 ]
    
    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@xxxxxxxxxx/
    Signed-off-by: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/mm/memblock.c b/mm/memblock.c
index 3a3ab73546f5..87a2b4340ce4 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -738,7 +738,7 @@ int __init_memblock memblock_add(phys_addr_t base, phys_addr_t size)
 /**
  * memblock_validate_numa_coverage - check if amount of memory with
  * no node ID assigned is less than a threshold
- * @threshold_bytes: maximal number of pages that can have unassigned node
+ * @threshold_bytes: maximal memory size that can have unassigned node
  * ID (in bytes).
  *
  * A buggy firmware may report memory that does not belong to any node.
@@ -758,7 +758,7 @@ bool __init_memblock memblock_validate_numa_coverage(unsigned long threshold_byt
 			nr_pages += end_pfn - start_pfn;
 	}
 
-	if ((nr_pages << PAGE_SHIFT) >= threshold_bytes) {
+	if ((nr_pages << PAGE_SHIFT) > threshold_bytes) {
 		mem_size_mb = memblock_phys_mem_size() >> 20;
 		pr_err("NUMA: no nodes coverage for %luMB of %luMB RAM\n",
 		       (nr_pages << PAGE_SHIFT) >> 20, mem_size_mb);




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux