Page MenuHomeFreeBSD

Retire vm_reserv_extend_{contig,page}()

Authored by alc on Jun 1 2019, 4:41 AM.



These functions were introduced as part of a false start toward fine-grained reservation locking. In the end, they were not needed, so eliminate them.

Update the comments about the locking requirements for vm_reserv_alloc_{contig,page}(). Neither requires the free page queues lock.

Order the parameters to vm_reserv_alloc_{contig,page}() consistently with the vm_page functions that call them.

Wrap several lines that are too long.

Diff Detail

rS FreeBSD src repository - subversion
Lint Not Applicable
Tests Not Applicable

Event Timeline

alc edited the summary of this revision. (Show Details)
642 ↗(On Diff #58145)

Shouldn't this condition checked at the entry to the function, near the 'Is a reservation fundamentally impossible?' block ?

642 ↗(On Diff #58145)

No, in the case where no reservation already exists, the code actually handles the possibility that the allocation spans two or more reservations. It's actually quite easy to do so when we are allocating the reservations all in one vm_phys call. Here, we would need to check if the physical memory immediately after the existing reservation is free (or can be reclaimed). Once upon a time, I deemed that too unlikely to succeed, and therefore not worth the implementation effort.

This revision is now accepted and ready to land.Jun 1 2019, 5:41 PM
This revision was automatically updated to reflect the committed changes.