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)
May 19 2024, 2:17 PM
Unknown Object (File)
May 19 2024, 12:42 PM
Unknown Object (File)
May 19 2024, 12:33 PM
Unknown Object (File)
Apr 23 2024, 8:08 PM
Unknown Object (File)
Feb 21 2024, 10:34 AM
Unknown Object (File)
Jan 27 2024, 8:04 PM
Unknown Object (File)
Jan 24 2024, 2:15 PM
Unknown Object (File)
Jan 16 2024, 6:53 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

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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
1409
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.