From owner-freebsd-fs@FreeBSD.ORG Wed Oct 3 08:42:07 2012 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31B72106566B; Wed, 3 Oct 2012 08:42:07 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id E03888FC12; Wed, 3 Oct 2012 08:42:05 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id LAA02709; Wed, 03 Oct 2012 11:42:04 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1TJKWq-000GSv-3Y; Wed, 03 Oct 2012 11:42:04 +0300 Message-ID: <506BFA5B.9060103@FreeBSD.org> Date: Wed, 03 Oct 2012 11:42:03 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:15.0) Gecko/20120913 Thunderbird/15.0.1 MIME-Version: 1.0 To: freebsd-fs@FreeBSD.org References: <505DB4E6.8030407@smeets.im> <20120924224606.GE79077@ithaqua.etoilebsd.net> <20120925090840.GD35915@deviant.kiev.zoral.com.ua> <20120929154101.GK1402@garage.freebsd.pl> <20120930122403.GB35915@deviant.kiev.zoral.com.ua> In-Reply-To: <20120930122403.GB35915@deviant.kiev.zoral.com.ua> X-Enigmail-Version: 1.4.3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Baptiste Daroussin , Florian Smeets , Pawel Jakub Dawidek Subject: Re: panic: _sx_xlock_hard: recursed on non-recursive sx zfsvfs->z_hold_mtx[i] @ ...cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c:1407 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Oct 2012 08:42:07 -0000 on 30/09/2012 15:24 Konstantin Belousov said the following: > The postponing of the reclaim when vnode reserve goes low to the vnlru > process does not solve anything, since you only change the recursion into > the deadlock. > > I discussed an approach for this issue with avg. Basic idea is presented in > the untested patch below. You can specify that some count of the free > vnodes must be present for some dynamic scope, started by > getnewvnode_reserve() function. While staying inside the reserved pool, > getnewvnode() calls would not recurse into vnlru(). The scope is finished > with getnewvnode_drop_reserve(). > > The getnewvnode_reserve() shall be called while no locks are held. > > What do you think ? Here is a patch that makes use of the getnewvnode_reserve API in ZFS: http://people.freebsd.org/~avg/zfs-getnewvnode.diff -- Andriy Gapon