Page MenuHomeFreeBSD

vm_domainset: Add batch page allocation iterators
Needs ReviewPublic

Authored by bnovkov on Oct 10 2024, 9:39 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 18, 9:41 PM
Unknown Object (File)
Fri, Dec 13, 11:09 PM
Unknown Object (File)
Thu, Nov 28, 5:52 PM
Unknown Object (File)
Fri, Nov 22, 5:14 PM
Unknown Object (File)
Fri, Nov 22, 2:52 AM
Unknown Object (File)
Nov 19 2024, 5:20 PM
Unknown Object (File)
Nov 6 2024, 4:43 AM
Unknown Object (File)
Nov 4 2024, 9:54 AM
Subscribers

Details

Reviewers
markj
alc
kib
Summary

Each page allocation uses the vm_domainset iterators to determine
the allocation domain. However, the iterators have to be initialized
for every 0-order page, leading to unnecessary overhead when
allocating multiple pages.

This change addresses this issue by introducing a batch page allocation
iterator that divides an allocation request into smaller chunks
according to the active domainset(9) policy. Advancing the iterator
returns a number of pages to allocate from the target domain.

Assuming a request of "N" pages, the batch page iterator behaves
as follows:
FIRSTTOUCH and PREFER:

The first iteration will return "N" and will fall back to
ROUNDROBIN behavior on subsequent iterations.

INTERLEAVE:

Each iteration returns the difference between the current pindex and the
next 'domainset_stride'-aligned pindex.

ROUNDROBIN:

Each iteration returns "N / vm_ndomains"

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 59889
Build 56774: arc lint + arc unit