On 10/13/2015 7:10 PM, Jeff Roberson wrote: > Author: jeff > Date: Wed Oct 14 02:10:07 2015 > New Revision: 289279 > URL: https://svnweb.freebsd.org/changeset/base/289279 > > Log: > Parallelize the buffer cache and rewrite getnewbuf(). This results in a > 8x performance improvement in a micro benchmark on a 4 socket machine. > > - Get buffer headers from a per-cpu uma cache that sits in from of the > free queue. > - Use a per-cpu quantum cache in vmem to eliminate contention for kva. > - Use multiple clean queues according to buffer cache size to eliminate > clean queue lock contention. > - Introduce a bufspace daemon that attempts to prevent getnewbuf() callers > from blocking or doing direct recycling. > - Close some bufspace allocation races that could lead to endless > recycling. > - Further the transition to a more modern style of small functions grouped > by prefix in order to improve growing complexity. > > Sponsored by: EMC / Isilon > Reviewed by: kib > Tested by: pho > > Modified: > head/sys/kern/vfs_bio.c > head/sys/vm/vm_init.c ... > +static void > +bufkva_reclaim(vmem_t *vmem, int flags) > +{ > + int i; > + > + for (i = 0; i < 5; i++)
What is the significance of '5' here? It seems arbitrary without comments or a tunable that other code is based on. > + if (buf_scan(true) != 0) > + break; > + return; > +} -- Regards, Bryan Drewery
signature.asc
Description: OpenPGP digital signature