svn commit: r319699 - head/sys/kern
Alan Cox
alc at FreeBSD.org
Thu Jun 8 15:48:56 UTC 2017
Author: alc
Date: Thu Jun 8 15:48:54 2017
New Revision: 319699
URL: https://svnweb.freebsd.org/changeset/base/319699
Log:
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
Modified:
head/sys/kern/subr_blist.c
Modified: head/sys/kern/subr_blist.c
==============================================================================
--- head/sys/kern/subr_blist.c Thu Jun 8 15:47:52 2017 (r319698)
+++ head/sys/kern/subr_blist.c Thu Jun 8 15:48:54 2017 (r319699)
@@ -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;
}
More information about the svn-src-head
mailing list