Page MenuHomeFreeBSD

Avoid testing bighint in blist_alloc
ClosedPublic

Authored by dougm on Nov 16 2018, 4:30 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Dec 7, 3:05 PM
Unknown Object (File)
Fri, Dec 6, 1:36 PM
Unknown Object (File)
Nov 26 2024, 8:45 AM
Unknown Object (File)
Oct 2 2024, 10:23 PM
Unknown Object (File)
Sep 23 2024, 9:49 PM
Unknown Object (File)
Sep 23 2024, 9:49 PM
Unknown Object (File)
Sep 23 2024, 9:48 PM
Unknown Object (File)
Sep 23 2024, 9:48 PM
Subscribers

Details

Summary

Terminate a blist_alloc search when a blst_meta_alloc calls fails with cursor == 0.

Every call to blst_meta_alloc but the one at the root is made only when the meta-node is known to include a free block, so that either the allocation will succeed, the node hint will be updated, or the last block of the meta node range is, and remains, free. But the call at the root is made without checking that there is a free block, so in the case that every block is allocated, there is no hint update to prevent the current code from looping forever.

Test Plan

Peter, this is likely to address the 11-hour freeze you reported elsewhere.

Diff Detail

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

Event Timeline

dougm added a reviewer: alc.
dougm edited the test plan for this revision. (Show Details)
dougm added a subscriber: pho.

I ran the problem test scenario for 24 hours without seeing any issues.

Update a comment. Fix a style issue.

sys/kern/subr_blist.c
310 ↗(On Diff #51423)

You might as well issue the return here.

dougm marked an inline comment as done.
dougm edited the summary of this revision. (Show Details)

I ran the problem scenario for 16 hours + a mix of other tests.
D17999.51501.diff looks good to me.

dougm removed a subscriber: pho.
This revision is now accepted and ready to land.Dec 5 2018, 5:58 AM
This revision was automatically updated to reflect the committed changes.