Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp313453ybm; Tue, 26 May 2020 17:57:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyC5itGjsJOMxuDG5zYMvdG9u7bvuXoo/ijMDOlF+Mucn4vzZKmc+ZeU5mzgQZg09CDQDjO X-Received: by 2002:a17:906:860a:: with SMTP id o10mr3354147ejx.250.1590541058328; Tue, 26 May 2020 17:57:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590541058; cv=none; d=google.com; s=arc-20160816; b=zJ2h1H32UWQ8/nzCXqYwhvBMPDBZ1G/wtTQs2W/5Q0pIQJszpbcLiVrjn+MmeQdpzv j/g9ELRZ4B27hiEtKCqKF11VjvlwZUXJqhqSTsbqGDoa1fFyL5hM3sIl9ds/2S+grScb AdzqB8mWA8ZXghidG/qq8dLHXW/53c8goFl4CwTWBZgBhWUqR0xP/IHtVO58DOdzl3jz i40ZD02nfJJjGeopY80Hj30lv+NlR9HOHvr0ftGCStiEYKcrXMLRaV4kpS9yaYvNJuh2 leXKabv9KKm6vMnRLP1b//qvqRjcaKVdhfPFXUiZXU0FXJB6VVni5faxbLtp1OiCzG4S b5Iw== 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=qdvaRsxr7i84jB+7s5+FQWOnyFJl2KHp4wWCRvGNhl4=; b=Z6K7fh8xQU2qCHIFFMMAfCxfx0C0uADNbxRphdZy75bDq9HswBl0KkpOLZ8Chqu/So NvGFo0XTKWQvmCYEtl2t7cKjjcLpJDFV7RbGNcRu5A7MbCSHHTswBdZltnfQ5l4JHnjA /MnCDGYa3TX833w90dUxVKWKEsEthW+e3Y1JXz/Yh04m7Lct2k0VK/njA4anbGXsCdkc L/qLqZBTV8Hym8k4zOTFuARJY2dxSweiVPdnTKVRkylrtFozbOuhhq3cT+ecNooNltwe QlI3/DMYKWvGI9Gdz/+xJfkMVoPtvqlqrTFxrxBOWd3+ekT6i5swW1ej+zNV4bO9Le8E syrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=k0gOJrG8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n15si756206ejd.527.2020.05.26.17.57.15; Tue, 26 May 2020 17:57:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=k0gOJrG8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389488AbgEZV1Q (ORCPT + 99 others); Tue, 26 May 2020 17:27:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388967AbgEZV1Q (ORCPT ); Tue, 26 May 2020 17:27:16 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EFFEC061A0F for ; Tue, 26 May 2020 14:27:16 -0700 (PDT) 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; bh=qdvaRsxr7i84jB+7s5+FQWOnyFJl2KHp4wWCRvGNhl4=; b=k0gOJrG8ryKOn+EtI9ACNut+fY iJi7u6W4t5O0tUdkoZGQ4VnxsX01fLajBEeuMmRlbGkGCX//4DsE4fakfbnrKs/ykwqXAnzqbQ0s+ iABr7FXdYeHMAFSoHbdsbZWSPsGcpSqy3P2IDHCncUCoKniP61MsEkSJVxS3LI1XGVvyp8sH23sef y2wyNWNy2e8UlslE7ovjhDeDOfDKeevEiIaVaSwlYfUax52+vmZ71VtSmj2cGqUoE4tpjcp+Klz8a LfEF3jo22xQyA3NxEG56VDgKGzb2tyO+2Agz93akuS8OOdHpgBoIhTPJj1RsNAEAXfGS9PL0dM5ge XZML54fA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=worktop.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jdh6M-0008EJ-Mu; Tue, 26 May 2020 21:27:10 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id E43A99834AB; Tue, 26 May 2020 23:27:07 +0200 (CEST) Date: Tue, 26 May 2020 23:27:07 +0200 From: Peter Zijlstra To: Waiman Long Cc: Qian Cai , Ingo Molnar , Will Deacon , linux-kernel@vger.kernel.org Subject: Re: [PATCH] locking/lockdep: Increase MAX_LOCKDEP_ENTRIES by half Message-ID: <20200526212707.GE2483@worktop.programming.kicks-ass.net> References: <20200526174349.8312-1-longman@redhat.com> <20200526185850.GE991@lca.pw> <20200526195630.GF325280@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 26, 2020 at 04:30:58PM -0400, Waiman Long wrote: > On 5/26/20 3:56 PM, Peter Zijlstra wrote: > > On Tue, May 26, 2020 at 02:58:50PM -0400, Qian Cai wrote: > > > > > I still don't understand why reading all sysfs files on this system > > > could increase that much, but here is the lockdep file after > > > running sysfs read to see if you could spot anything obviously, > > > > > > https://cailca.github.io/files/lockdep.txt > > 00000000f011a2a5 OPS: 20 FD: 45 BD: 1 .+.+: kn->active#834 > > > > is that somewhere near the number of CPUs you have? > > > > Anyway, there's very long "kn->active#..." chains in there, which seems > > to suggest some annotation is all sorts of buggered. > > > It is actually one active lock per instance of the kerfs_node structures. > That means more than 800 sysfs files are accessed in some way. As we could > have much more than 800 sysfs files in the system, we could easily overwhelm > the lockdep tables if we really try to access all of them. A lock per instance is crazy, that's not what lockdep is made for. Fixing this seems like a far better idea than increasing the numbers.