Received: by 10.213.65.68 with SMTP id h4csp1517179imn; Thu, 29 Mar 2018 06:14:19 -0700 (PDT) X-Google-Smtp-Source: AIpwx48Y2ZyEmpX0AF5udn4mVJNb9GjZ8PYBJEstuuguSfH0G3dGoEIx+hvybMVvd02tfqIlAqO3 X-Received: by 2002:a17:902:b690:: with SMTP id c16-v6mr4749973pls.246.1522329259041; Thu, 29 Mar 2018 06:14:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522329259; cv=none; d=google.com; s=arc-20160816; b=sIzeRMp+hBDyq5JGNMUpRsEXro9qzsDszf3FHBwJWiAyXRtOM7BvEznjWknuu8j2UE KHvyQ+E8zA4hZw/WL8+3HuUhh2PDQ6OOM7OyeY5JN69u8CKwMysynH0L3gGKy5Rzg6yD iKDyu3K3DB5iGW3SUXkbRqaUIZ0qWqeuuUuINjwUlquio3VjccVfE4UBLTiTq6PDsJV2 sdXby5U+iPdcUv9a90ckky3GHlcTabYe/u3I3BKbqaI8a72VcLMBdYSK4TuYKCggPuNW hNQIlYNgy3HF6Y8UN6CMmo28p/kpFtKTcr2b+XhzfrpXT4+1muf4U1uhZjVIkyrhfhoz Ps6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:arc-authentication-results; bh=CAhhrD1re8e/hA4d8/9i0jae7JDfm13mFsTBpJ1Fjgs=; b=eVAUc3+296w0qPwH7C3SnX+0Oxd2uSBwjMtmGLt4UyC/I6k6rEd+2aS0j8xayftAST x1oSBBTh7qe3AOV8poLFQ6I59HqPpf3YF2c8ZXgv6wOEYgKat/0Rh1MlgLE4XuBvRFhn Ph+9V9klQObTt6vXs2iwP9WoN20EhHmWpeSUMjoLLL37uyyZrBhH3b855CJqFdb+A60I qZ7nUqbVltSHv1ECeK7E2a4ZuPWFd/MjzEMmDDBH/ex4gPn7eZ5+FAMKu3J9oIxL+4pt aPMS5Nag+7nx1VB3rIgIdFR81QQwbrPcz/AQXR29k3Q5vAbh4KaCNEA9TUr6bf9xHvkO YulQ== 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 k22-v6si5680466pli.471.2018.03.29.06.14.05; Thu, 29 Mar 2018 06:14:19 -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 S1752634AbeC2NMM (ORCPT + 99 others); Thu, 29 Mar 2018 09:12:12 -0400 Received: from mail-it0-f68.google.com ([209.85.214.68]:40714 "EHLO mail-it0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751227AbeC2NML (ORCPT ); Thu, 29 Mar 2018 09:12:11 -0400 Received: by mail-it0-f68.google.com with SMTP id y20-v6so7820821itc.5 for ; Thu, 29 Mar 2018 06:12:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=CAhhrD1re8e/hA4d8/9i0jae7JDfm13mFsTBpJ1Fjgs=; b=n7ADYiirWbvYvQNunt9LAzXj4++bMBxCrQPQemPHCSjGm07PNKNikraAkqjpmcQIHz AduDyIs+bmo8+HMbqPhkktQ2bmV9ua/xbhBzKaw4GpzHk5EEMYpWyMTc3dW2aOXOlCsX 4l2jf/JsS2l1V4Ifl3wFXovLg+BaZ2BwU13vDj6OlHXO4svq3fw6xiZJPp7ySloImq2T 0o71AlTOyqtgqeCL6T74GDA4PmbeJRac9rB0ycc3+fNXALjqskowGB6QfkcUN1rcTujG J353klEp9+ZFBPPEqYRZ8kEpQebn06RYU6OkP/EgkKvm94dyikSoxRtYYXOoZukBySSr ST+A== X-Gm-Message-State: ALQs6tD3OXEZoov6b52NLK9miF3nJCdaRUoz0o7YWNo1io6Qbqzm3qqQ hLg8fqyDrDoOWGeKLrVGMm9bzHqOkcD0/1OBlbEyKA== X-Received: by 2002:a24:f685:: with SMTP id u127-v6mr7257748ith.131.1522329130721; Thu, 29 Mar 2018 06:12:10 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.12.135 with HTTP; Thu, 29 Mar 2018 06:12:09 -0700 (PDT) In-Reply-To: References: <20180329120612.6104-1-agruenba@redhat.com> From: Andreas Gruenbacher Date: Thu, 29 Mar 2018 15:12:09 +0200 Message-ID: Subject: Re: [Cluster-devel] [PATCH v2 0/2] gfs2: Stop using rhashtable_walk_peek To: Steven Whitehouse Cc: cluster-devel , Herbert Xu , netdev@vger.kernel.org, LKML , NeilBrown , Thomas Graf , Tom Herbert Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29 March 2018 at 14:24, Steven Whitehouse wrote: > Hi, > > Can we solve the problem another way, by not taking refs on the glocks when > we are iterating over them for the debugfs files? I assume that is the main > issue here. > > We didn't used to take refs since the rcu locking was enough during the walk > itself. We used to only keep track of the hash bucket and offset within the > bucket when we dropped the rcu lock between calls to the iterator. I may > have lost track of why that approach did not work? That doesn't work because when a glock doesn't fit into one read, we need to make sure that the next read will continue with the same glock or else we'll end up with a corrupted dump. And rhashtable_walk_peek cannot guarantee that. I've done some minimal performance testing and the additional ref taking only impacted the performance in the 10% range or less, so it doesn't really matter. Andreas