HomeFreeBSD

Implement the M_NEXTFIT allocation strategy for vmem(9).

Description

Implement the M_NEXTFIT allocation strategy for vmem(9).

This is described in the vmem paper: "directs vmem to use the next free
segment after the one previously allocated." The implementation adds a
new boundary tag type, M_CURSOR, which is linked into the segment list
and precedes the segment following the previous M_NEXTFIT allocation.
The cursor is used to locate the next free segment satisfying the
allocation constraints.

This implementation isn't O(1) since busy tags aren't coalesced, and we
may potentially scan the entire segment list during an M_NEXTFIT
allocation.

Reviewed by: alc
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D17226

Details

Provenance
markjAuthored on
Reviewer
alc
Differential Revision
D17226: Implement M_NEXTFIT.
Parents
rS347948: Add DragonFly's partition number to fdisk(8) and diskmbr.h
Branches
Unknown
Tags
Unknown