From owner-svn-src-head@freebsd.org Mon May 15 10:10:12 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B39BCD6DF52; Mon, 15 May 2017 10:10:12 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 31502A58; Mon, 15 May 2017 10:10:12 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v4FA9xrT076856 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 15 May 2017 13:09:59 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v4FA9xrT076856 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v4FA9xNY076855; Mon, 15 May 2017 13:09:59 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 15 May 2017 13:09:59 +0300 From: Konstantin Belousov To: Ryan Libby Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r318285 - head/sys/kern Message-ID: <20170515100959.GB1622@kib.kiev.ua> References: <201705151002.v4FA2jqi045123@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201705151002.v4FA2jqi045123@repo.freebsd.org> User-Agent: Mutt/1.8.2 (2017-04-18) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 10:10:12 -0000 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 This must be Ryan Libby , I am sorry. > Tested by: pho > Differential revision: https://reviews.freebsd.org/D10692