Date: Fri, 30 Oct 2015 15:23:00 -0700 From: Bryan Drewery <bdrewery@FreeBSD.org> To: Jeff Roberson <jeff@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289279 - in head/sys: kern vm Message-ID: <5633EDC4.4050907@FreeBSD.org> In-Reply-To: <201510140210.t9E2A79H056595@repo.freebsd.org> References: <201510140210.t9E2A79H056595@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] 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 [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJWM+3EAAoJEDXXcbtuRpfPDk4H/juqqo5tgykglYFAfPHK3rsn Yoqn/61xEX8hYoZ5hEE3vJR+gDrwu/CCi+ls8jPOj3q/DxPtI8NK9XVhbAgaGhfm wO9unNtVmjb2UDaEH6iUIelPqDBWUP99h/K39Pw8vGpWf5l5+D864tiRxykf6WQk dWRAA13iq0vzFUVBbwilZL5ETTtg0fDxcXflJ++Hy6PFttqmDR6aX5J8/XLdkTFn WhWqo3Afm93ALa0eCm/daJNX6oW/VdahuuuD9s+M1eVSlE6YVsdagBj9dFLkO4kw IQsfBYGzSOB7NX+swQXPJBtN8PN0XdTs7Rac3ClhmQQdMjeJChsalWkwsGGh4Cs= =hpf0 -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5633EDC4.4050907>
