Received: by 10.213.65.68 with SMTP id h4csp1453725imn; Thu, 29 Mar 2018 05:08:54 -0700 (PDT) X-Google-Smtp-Source: AIpwx49ip6p7kmbbt8vAI75U7cARL5vYINZKG7bmzynVFQ6pZMA71qE36QHdwVFraA1JDigSJ2SV X-Received: by 2002:a17:902:2c83:: with SMTP id n3-v6mr8270443plb.140.1522325334739; Thu, 29 Mar 2018 05:08:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522325334; cv=none; d=google.com; s=arc-20160816; b=oD/kV1uWUihrlaB/LxVQNf7ffzM/m1Phif10/R2xiYF1CR/gMIxbNSfAOfhJSpGp2g TwjTYvtWkjTpdMPmYeuXWyiwnDST5g2l2aUBZ/KasS7MA7ulqXNxbz3F3Rj1vBUsWWy7 mrPJA4TruuBXC5XCBLAcW5lvfPFqbmQzsuaLTAksVKwMaPVn4l678sCzMPWFwODeEugY KepqKFQmA733JyZrMjWhRkrkkMpJh68sFL3ed+o2HWnuyS0TRuDMssncJgx5wbA50swt LxLQl5EnoeP97ZB49JZkkgIx2+/LMa34pC0zz+pYBv2rEr0JJsCnNCJHeIeBFJpzIFar Fn/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=qdemZ2FyXHywH+vlFwxU3FqmnSPtTK5nROWcTMILzCI=; b=lWGyhOuY3H0DrF82qdUdSSSChs2O22rrMtlCO7zG1BEAeMZF0jk6Pvuw9T6PCA3Ygv oHa+XzQRlFLV7yQMfQtrxG5169YvH+zLnS6/MgYRoZc21KweA4JkSE61bOm/7KdIWPbW npwVS+PY58Fv1Adf6IM6Cm4bIKF5ZatH+nQo7c+e50bc734IztqrHceEeftSRyG3KBB+ +wRR5ILJg3/1ba1oTZnj+UVW1Z42hX+J4RKRpiTy8XGYXnBvwtgo8jzoaq1l6lDGQ7s5 bAPhOupNXonLLEgz5nyFnoLPKgtW+bG+Yj3hmWU5oGlVwa3I5gnIlUUjA0aaJ8CHSgoT nXdw== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s19si3916610pgv.479.2018.03.29.05.08.40; Thu, 29 Mar 2018 05:08:54 -0700 (PDT) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752725AbeC2MGU (ORCPT + 99 others); Thu, 29 Mar 2018 08:06:20 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:53058 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752300AbeC2MGS (ORCPT ); Thu, 29 Mar 2018 08:06:18 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6E2A44023155; Thu, 29 Mar 2018 12:06:18 +0000 (UTC) Received: from max.home.com (ovpn-117-14.ams2.redhat.com [10.36.117.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id F16C1215CDC5; Thu, 29 Mar 2018 12:06:13 +0000 (UTC) From: Andreas Gruenbacher To: cluster-devel@redhat.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, NeilBrown , Thomas Graf , Herbert Xu , Tom Herbert , Andreas Gruenbacher Subject: [PATCH v2 0/2] gfs2: Stop using rhashtable_walk_peek Date: Thu, 29 Mar 2018 14:06:10 +0200 Message-Id: <20180329120612.6104-1-agruenba@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Thu, 29 Mar 2018 12:06:18 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Thu, 29 Mar 2018 12:06:18 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'agruenba@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Here's a second version of the patch (now a patch set) to eliminate rhashtable_walk_peek in gfs2. The first patch introduces lockref_put_not_zero, the inverse of lockref_get_not_zero. The second patch eliminates rhashtable_walk_peek in gfs2. In gfs2_glock_iter_next, the new lockref function from patch one is used to drop a lockref count as long as the count doesn't drop to zero. This is almost always the case; if there is a risk of dropping the last reference, we must defer that to a work queue because dropping the last reference may sleep. Thanks, Andreas Andreas Gruenbacher (2): lockref: Add lockref_put_not_zero gfs2: Stop using rhashtable_walk_peek fs/gfs2/glock.c | 47 ++++++++++++++++++++++++++++------------------- include/linux/lockref.h | 1 + lib/lockref.c | 28 ++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+), 19 deletions(-) -- 2.14.3