svn commit: r318285 - head/sys/kern

Konstantin Belousov kostikbel at gmail.com
Mon May 15 10:10:12 UTC 2017


On Mon, May 15, 2017 at 10:02:45AM +0000, Konstantin Belousov wrote:
> Author: kib
> Date: Mon May 15 10:02:45 2017
> New Revision: 318285
> URL: https://svnweb.freebsd.org/changeset/base/318285
> 
> Log:
>   mnt_vnode_next_active: use conventional lock order when trylock fails.
>   
>   Previously, when the VI_TRYLOCK failed, we would spin under the mutex
>   that protects the vnode active list until we either succeeded or
>   noticed that we had hogged the CPU. Since we were violating the lock
>   order, this would guarantee that we would become a hog under any
>   deadlock condition (e.g. a race with vdrop(9) on the same vnode). In
>   the presence of many concurrent threads in sync(2) or vdrop etc, the
>   victim could hang for a long time.
>   
>   Now, avoid spinning by dropping and reacquiring the locks in the
>   conventional lock order when the trylock fails. This requires a dance
>   with the vnode hold count.
>   
>   Submitted by:	Tom Rix <trix at juniper.net>
This must be Ryan Libby <rlibby at gmail.com>, I am sorry.

>   Tested by:	pho
>   Differential revision:	https://reviews.freebsd.org/D10692


More information about the svn-src-all mailing list