Index: uvm_pglist.c =================================================================== RCS file: /cvsroot/src/sys/uvm/uvm_pglist.c,v retrieving revision 1.88 diff -p -u -r1.88 uvm_pglist.c --- uvm_pglist.c 26 Mar 2021 09:35:18 -0000 1.88 +++ uvm_pglist.c 30 Jul 2021 17:04:40 -0000 @@ -386,6 +386,30 @@ uvm_pglistalloc_contig_aggressive(int nu for (i = 0; i < acnt; i++) { pg = PHYS_TO_VM_PAGE(spa - alignment + ptoa(i)); + KASSERTMSG(pg != NULL, + "num %d " + "low 0x%jx high 0x%jx " + "alignment 0x%jx boundary 0x%jx " + "pa 0x%jx upm %p " + "upmstart 0x%jx upmend 0x%jx " + "rlo 0x%jx rhi 0x%jx " + "spa 0x%jx i %d", + num, + (uintmax_t)low, + (uintmax_t)high, + (uintmax_t)alignment, + (uintmax_t)boundary, + (uintmax_t)pa, + (void *)(uintptr_t)upm, + (uintmax_t) + ptoa(uvm_physseg_get_avail_start(upm)), + (uintmax_t) + ptoa(uvm_physseg_get_avail_end(upm)), + (uintmax_t)rlo, + (uintmax_t)rhi, + (uintmax_t)spa, + i); + if ((pg->flags & PG_PGLCA) == 0) { break; } @@ -406,6 +430,29 @@ uvm_pglistalloc_contig_aggressive(int nu } for (; run < num; run++) { pg = PHYS_TO_VM_PAGE(spa + ptoa(run)); + KASSERTMSG(pg != NULL, + "num %d " + "low 0x%jx high 0x%jx " + "alignment 0x%jx boundary 0x%jx " + "pa 0x%jx upm %p " + "upmstart 0x%jx upmend 0x%jx " + "rlo 0x%jx rhi 0x%jx " + "spa 0x%jx run %d", + num, + (uintmax_t)low, + (uintmax_t)high, + (uintmax_t)alignment, + (uintmax_t)boundary, + (uintmax_t)pa, + (void *)(uintptr_t)upm, + (uintmax_t) + ptoa(uvm_physseg_get_avail_start(upm)), + (uintmax_t) + ptoa(uvm_physseg_get_avail_end(upm)), + (uintmax_t)rlo, + (uintmax_t)rhi, + (uintmax_t)spa, + run); if ((pg->flags & PG_PGLCA) == 0) { break; }