Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp397428ybm; Tue, 26 May 2020 20:54:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzK9fJqVYvIs18AH/9Ckxmp5jVSTcienxz+48LQ6fcX03GfqHiiH8h/v/eLGP73tkvjhpEs X-Received: by 2002:a17:906:4dc3:: with SMTP id f3mr3921314ejw.323.1590551659570; Tue, 26 May 2020 20:54:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590551659; cv=none; d=google.com; s=arc-20160816; b=o0OBtzd318J+HCeQ1YUacEpe57xG4SH2XaNN0tK7tIUB8btLXZ6i3TPNmGfd70payb cQ89C9TOJZQdAfSw/DjtZmbh5ejY7XiFP3Zd9QxCXuucBmKmnFhZ2rtGjIo6Tg76epeQ rB00BlnkbKD8r7dzolbcBJYdnli9HFLSnT4eJUw96LdX66215TnixA6ypa6hQdh8Jeza whSLdnOP/02HE5eIOuFffCPK6/vrodfCkLwPKEeYl93K6Tr68/07YHzW/4x4h7/qPEgn t52KDY3Imqs3uSbcGeyP5sWEm28IJ1kvckdkPteNgZmrfOKg6byYn9Fpyfqs2zfsoG7D L/ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=TeV4Ee0rJbTsY7d9AFmITz3Jb7JZiolk7a5WrjoAzbk=; b=1GK44QAOex5PfFb4e127Ydiapz6OtYH+aY2NuQUhtC+X7+ONwlhREbentvT+7ey9BE yttrby9XFrrQnXS4J6ASRf29ve0MUPKGq20uTZ5zLXvmlUkg43Pc4urS0GISHZ1prvkC I720wJcIOzzVoD6+1Ephoj/ypg9uRT4g2iOXW3yxIAfrLvgSY66tlqia6xT68Rxkobmc amuIYOHEplaGgnDMy0ltXm7UNUGymiyB15PPm8zKZPP6VSpYRnm8ieSHbduiXzu0po58 PAP54ojgMUv+gUQnTpTE5AHiVZyClwZeBVvOQPUHPKXIvxjIvm/25MXMOjuKSfumU3LO iSsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=nbd8L+Wg; 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 j8si1110334ejb.158.2020.05.26.20.53.57; Tue, 26 May 2020 20:54:19 -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=pass header.i=@lca.pw header.s=google header.b=nbd8L+Wg; 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 S2391231AbgEZVYH (ORCPT + 99 others); Tue, 26 May 2020 17:24:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389914AbgEZVYH (ORCPT ); Tue, 26 May 2020 17:24:07 -0400 Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F34BC061A0F for ; Tue, 26 May 2020 14:24:06 -0700 (PDT) Received: by mail-qt1-x844.google.com with SMTP id x12so17461373qts.9 for ; Tue, 26 May 2020 14:24:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=TeV4Ee0rJbTsY7d9AFmITz3Jb7JZiolk7a5WrjoAzbk=; b=nbd8L+WgUcdz7k1REuKHKpHXR3rF9nc4a8g25dlTLgIeJAIwAG7dedgCu0mWsKv1CI +UEfuGSTs/3U5TgfvK/pZH1kY806eHNfFcWvSYHAcCGpLDQSRkmxnUILpQyP50c8uXeo ppdnnu9QPBdjsMqh3WTWkWFBJ7OkXsBzLjonDqeYFJB92nMXXuy4B7qq//j9YZ9TTCHr oU7OgYctIdtg40TxdB+vyx3CVzG3dMVCLXrYoQUc0IpSMkLl99G/SaHnZ/12N9eBdslz viVMJB1rh3wSU3OJalsh2sGpe4Uj8CI1YBQmAJLIwW/TaUhwUO4XW/mqZs21fnCSnQJa RH0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=TeV4Ee0rJbTsY7d9AFmITz3Jb7JZiolk7a5WrjoAzbk=; b=WGG+DJDx8fg71M11tnPEO83BEcAvG/jhYi2Ut1a7mL3Gr3OiU5+hnQ9yA5e0nrrt4i TyGK+ftxFVK63w+TMRxC6KgtR3gZmn0b/PcACuQPXxRGwY3K5zhhI3xDQtbifQMYdCye nlREUcJ1oj+x4+9dlWhlro0sGiUUD6gEw/eu6E7bTOVWhynVHO545L6slDEhxfbNgJ2X 7I5JYY0lsgfAvfs2l85grSusnES16dWi/he4kxn3V1zIIwQSLYzCNdPLRxrU5tytR/fV bxXWaP3Wf3CD2ujx84SOBUWo90/HNzRKdE4XvyFddWBbQt+P/KR9yeEu63MBqIMmDZYa 9cQQ== X-Gm-Message-State: AOAM532OR+rK6pTuldZ7blJe4g3ygzbADedzmCU4CzAidseAJXIPz+9x xmKMJvoMz9IH1gmqJhSoqPWQBQ== X-Received: by 2002:ac8:6d11:: with SMTP id o17mr928314qtt.266.1590528245300; Tue, 26 May 2020 14:24:05 -0700 (PDT) Received: from lca.pw (pool-71-184-117-43.bstnma.fios.verizon.net. [71.184.117.43]) by smtp.gmail.com with ESMTPSA id h77sm748154qke.37.2020.05.26.14.24.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 May 2020 14:24:04 -0700 (PDT) Date: Tue, 26 May 2020 17:24:02 -0400 From: Qian Cai To: Waiman Long Cc: Peter Zijlstra , Ingo Molnar , Will Deacon , linux-kernel@vger.kernel.org Subject: Re: [PATCH] locking/lockdep: Increase MAX_LOCKDEP_ENTRIES by half Message-ID: <20200526212402.GH991@lca.pw> 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: 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. Yes, there are a lot of those on large systems, NUMA, percpu, slab etc. Isn't it better to extend MAX_LOCKDEP_ENTRIES dynamically? There are plenty of memory over there.