When allocating swap blocks, if the available number of free blocks in a
subtree is already zero, then setting the "largest contiguous free block" hint for that subtree to anything other than zero makes no sense. To be clear, assigning a value to the hint that is too large is not a correctness problem, only a pessimization. Dragonfly BSD has applied the same change to blst_meta_alloc() but not blst_meta_fill(). MFC after: 6 weeks
This commit is contained in:
parent
f2b7bf8afc
commit
86dd278f03
@ -419,7 +419,7 @@ blst_meta_alloc(
|
||||
/*
|
||||
* ALL-ALLOCATED special case
|
||||
*/
|
||||
scan->bm_bighint = count;
|
||||
scan->bm_bighint = 0;
|
||||
return(SWAPBLK_NONE);
|
||||
}
|
||||
|
||||
@ -774,7 +774,7 @@ blst_meta_fill(
|
||||
*/
|
||||
nblks = scan->u.bmu_avail;
|
||||
scan->u.bmu_avail = 0;
|
||||
scan->bm_bighint = count;
|
||||
scan->bm_bighint = 0;
|
||||
return nblks;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user