Page MenuHomeFreeBSD

vm_reserv: introduce unmanaged reservations
AbandonedPublic

Authored by bnovkov on May 1 2024, 1:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Dec 21, 4:04 PM
Unknown Object (File)
Sun, Dec 8, 3:11 PM
Unknown Object (File)
Nov 25 2024, 5:11 PM
Unknown Object (File)
Nov 17 2024, 6:10 PM
Unknown Object (File)
Oct 23 2024, 6:05 PM
Unknown Object (File)
Oct 20 2024, 7:36 PM
Unknown Object (File)
Sep 27 2024, 8:41 AM
Unknown Object (File)
Sep 26 2024, 5:09 AM
Subscribers

Details

Reviewers
alc
markj
kib
Summary

This is the first of four patches in a series that aims to replace uma_small_alloc with a reservation-aware 0-order page allocator.

This patch introduces unmanaged reservations, i.e. reservations that are not a part of any vm_object but are still used to serve page allocation requests. In this case, they are used to allocate 0-order pages for UMA zones.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

sys/vm/vm_reserv.c
151

Why 4 bits and not 1?

Or you might use a special invalid object value like (vm_object_t)1 instead of adding inpartpopq flags. I mention this because the check for free reservation is rv->object == NULL, which can be kept intact this way. Also unmanaged becomes exclusive with managed reservation condition by the mere way it is stored.

sys/vm/vm_reserv.c
151

No particular reason, the 4 bit split seemed cleaner since both fields are effectively booleans.

I hadn't considered the special vm_object approach, I like it more than the current approach of adding in new fields.
I'll try to work it into the patch.

Address @kib 's comment - unmanaged reservations are now distinguished using an invalid vm_object value instead of a separate variable.

kib added inline comments.
sys/vm/vm_reserv.c
1469

you can express the 4 lines above as

return (rv->object == VM_RESERV_NOOBJ_MARK);
This revision is now accepted and ready to land.May 25 2024, 10:49 PM