Date: Thu, 8 Jun 2017 15:48:54 +0000 (UTC) From: Alan Cox <alc@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319699 - head/sys/kern Message-ID: <201706081548.v58FmsJo053788@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706081548.v58FmsJo053788>