Page MenuHomeFreeBSD

Retire vm_reserv_extend_{contig,page}()
ClosedPublic

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

Details

Summary

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

Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

alc created this revision.Jun 1 2019, 4:41 AM
alc edited the summary of this revision. (Show Details)
kib added inline comments.Jun 1 2019, 12:04 PM
vm/vm_reserv.c
642

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

alc added inline comments.Jun 1 2019, 4:09 PM
vm/vm_reserv.c
642

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.

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