Page MenuHomeFreeBSD

only update blist cursor after successful allocation
ClosedPublic

Authored by dougm on May 6 2019, 10:02 PM.
Tags
None
Referenced Files
Unknown Object (File)
Nov 21 2024, 5:09 AM
Unknown Object (File)
Nov 20 2024, 3:26 PM
Unknown Object (File)
Nov 4 2024, 7:57 PM
Unknown Object (File)
Oct 12 2024, 11:53 AM
Unknown Object (File)
Oct 8 2024, 2:02 PM
Unknown Object (File)
Sep 17 2024, 4:13 AM
Unknown Object (File)
Sep 2 2024, 1:45 AM
Unknown Object (File)
Aug 31 2024, 9:47 PM
Subscribers

Details

Summary

The intention of the cursor is for the search for free blocks to resume where the last search left off. Suppose that there are no free blocks of size 32, but plenty of size 16. If we repeatedly request size 32 blocks, fail, and retry with size 16 blocks, then the failures all reset the cursor to the beginning of memory, making the 16 block allocation use a first fit, rather than next fit, strategy.

This change has blist_alloc make a copy of the cursor for its own decision making, and only updates the real blist cursor after a successful allocation, making those 16 block searches behave like next-fit searches.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable