Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp4467660ybc; Fri, 15 Nov 2019 05:14:41 -0800 (PST) X-Google-Smtp-Source: APXvYqzJUnXoZRp1bO5YI6x08u7mYHfPc54NwLfb2VBj1eZbvmj4462+TqrV2iYJQtiNmKK9ubym X-Received: by 2002:a17:906:390a:: with SMTP id f10mr872435eje.310.1573823681371; Fri, 15 Nov 2019 05:14:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573823681; cv=none; d=google.com; s=arc-20160816; b=qSwcofXUuAfsOirHOJYJWxTYTlVwgRdiJKdiux7y8nIKq/JLyke1FXHFdFmCGSv81k gdKgo/wkwsiIx5X5GJajtDIuk6sDBWV0ZLvnJ4mgVNiZPsBethYotKf+upFRHCw+f9bu Ssp0gr2G3DdD+draEJffcA0s9QsEW2dpoTavxGU/G7NNKyTdLS1Qkr1GLNs/drWOKMPF Czd4sL++VdqiMXTJ376Xye7VRzYT7zcD0L07k+4J+FFPOK2xodb4TQKmoheZFcv+fTLH sYmE2goCVxJlskliiXNPNETMUmFxeq0FPob6gowXPnzHh+GokrI1bNWb/qq0P55Q718R vKTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=5qrBznl1kz5QJqxp+sQGpXhaRVzPWa1p4hJJNJZ0Jd0=; b=0AR7p9y2b0sgeWN/Uy7nwzL2e5l0a6Cj64lHzquhrZmIJoWK4Erqnn4NPJIoUnLWau pfi8uyQa2fbtkbX246cLsci+ehCOzs1+S8PKAUQV6xkmwmp5j9iQfyEqA3k3pCyEO566 KS7lRI+W3irQy29PZJfLaKkXlTU06+lmsNm9K6dGJih0Btxh3k9YnijYPQgsBW181p9h CMColzw+kB/LYivPff9u3dEEK01abKktynl1tDWcJITjHO33irGwbHxef5nJIrleZQjl iQD8WMyb2Mc9DH+3n/2j/WixkQ4XS5sp3v4LuELILAaInJlr0A5PV4oJOVCmvWsdfPlR 9/NA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=t6Z61JPh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a11si5443187ejt.202.2019.11.15.05.14.15; Fri, 15 Nov 2019 05:14:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=t6Z61JPh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727417AbfKONNM (ORCPT + 99 others); Fri, 15 Nov 2019 08:13:12 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:42328 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727223AbfKONNM (ORCPT ); Fri, 15 Nov 2019 08:13:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=5qrBznl1kz5QJqxp+sQGpXhaRVzPWa1p4hJJNJZ0Jd0=; b=t6Z61JPhK9IXU/lJ4yGh3OOzK gyhHKgZVsCGkNkSL6aEOaoVabBnVMo90ps+rq/SckVJEPwL+MMqAMJxsqlR4buTwGoTixGUM9whnw uyZkcjTmBkgmylU2/4MUiCpK+9RQv5aTNTsPqlhjMhmKZPvuJa8zSapEmOlIGr+xt7/9EnaDU8udX x43/eka0xB3lwd5bjaASiexgzw0Sr/j28On2VEk5oSWsAA0Vohci6bBvlHXlD32ST+Gjd2B+vJmJ6 LeVa+Ud/9AzZ5T/ErB5f2NK4pUbiA+j4sbQ1zHroKy0Qu6fNDZTFWLwTOyjdZvKjMO4OV1YNmM/I+ ZfIyFqKMA==; Received: from hch by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1iVbPS-0006G2-P6; Fri, 15 Nov 2019 13:13:10 +0000 Date: Fri, 15 Nov 2019 05:13:10 -0800 From: Christoph Hellwig To: Dave Chinner Cc: Brian Foster , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 28/28] xfs: rework unreferenced inode lookups Message-ID: <20191115131310.GA18378@infradead.org> References: <20191031234618.15403-1-david@fromorbit.com> <20191031234618.15403-29-david@fromorbit.com> <20191106221846.GE37080@bfoster> <20191114221602.GJ4614@dread.disaster.area> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191114221602.GJ4614@dread.disaster.area> User-Agent: Mutt/1.12.1 (2019-06-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 15, 2019 at 09:16:02AM +1100, Dave Chinner wrote: > > Can we tie these into the proper locking interface using flags? For > > example, something like xfs_ilock(ip, XFS_ILOCK_EXCL|XFS_ILOCK_NONOWNER) > > or xfs_ilock(ip, XFS_ILOCK_EXCL_NONOWNER) perhaps? > > I'd prefer not to make this part of the common locking interface - > it's a one off special use case, not something we want to progate > elsewhere into the code. > > Now that I think over it, I probably should have tagged this with > patch with [RFC]. I think we should just get rid of the mrlock > wrappers rather than add more, and that would simplify this a lot. Yes, killing off the mrlock wrappers would be very helpful. The only thing we use them for is asserts on the locking state. We could either switch to lockdep_assert_held*, or just open code the write locked bit. While it is a little more ugly I'd tend towards the latter given that the locking asserts are too useful to require lockdep builds with their performance impact.