Page MenuHomeFreeBSD

Allow allocation of pages from beyond the last max order block of a range
ClosedPublic

Authored by dougm on Mar 31 2022, 7:13 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 25, 7:14 AM
Unknown Object (File)
Wed, Nov 20, 11:59 AM
Unknown Object (File)
Sun, Nov 17, 10:48 PM
Unknown Object (File)
Oct 8 2024, 7:49 AM
Unknown Object (File)
Oct 1 2024, 3:56 PM
Unknown Object (File)
Oct 1 2024, 3:56 PM
Unknown Object (File)
Oct 1 2024, 3:56 PM
Unknown Object (File)
Oct 1 2024, 3:56 PM
Subscribers

Details

Summary

In vm_phys_alloc_queues_contig, in the case that a sequence of max-order blocks are sought to fulfill an allocation, a sequence is ruled out if it does not have enough max-order blocks to satisfy the allocation. However, there may be smaller blocks of free memory that follow the last max-order block in the sequence, and they may be big enough complete the allocation request, so check for that possibility before giving up on that block sequence.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

dougm requested review of this revision.Mar 31 2022, 7:13 AM
dougm created this revision.

This looks right to me.

sys/vm/vm_phys.c
1420

It would be helpful to have a comment explaining what this loop does.

This revision is now accepted and ready to land.Mar 31 2022, 3:56 PM
This revision now requires review to proceed.Mar 31 2022, 4:29 PM
sys/vm/vm_phys.c
1411
dougm marked 2 inline comments as done.

Fix comment typo.

This revision is now accepted and ready to land.Mar 31 2022, 4:58 PM

I'm not sure how much testing is required for this patch.
I ran the three contigmalloc(9) tests I have in a loop for four hours. I followed up with a few hours of random stress2 tests.
No problems seen.