Page MenuHomeFreeBSD

vm_reserv: introduce unmanaged reservations
AcceptedPublic

Authored by bnovkov on May 1 2024, 1:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jun 13, 6:29 PM
Unknown Object (File)
Thu, Jun 13, 6:29 PM
Unknown Object (File)
Mon, May 27, 2:14 AM
Unknown Object (File)
May 13 2024, 7:09 AM
Unknown Object (File)
May 9 2024, 4:55 PM
Unknown Object (File)
May 5 2024, 1:06 AM
Unknown Object (File)
May 4 2024, 5:57 PM
Unknown Object (File)
May 2 2024, 6:43 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.Sat, May 25, 10:49 PM