svn commit: r289279 - in head/sys: kern vm

Bryan Drewery bdrewery at FreeBSD.org
Fri Oct 30 22:23:01 UTC 2015


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/svn-src-head/attachments/20151030/1f002fd9/attachment.bin>


More information about the svn-src-head mailing list