public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Carlos Llamas <cmllamas@google.com>
To: Waiman Long <longman@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>, Will Deacon <will@kernel.org>,
	linux-kernel@vger.kernel.org, kernel-team@android.com,
	Huang Ying <ying.huang@intel.com>,
	"J. R. Okajima" <hooanon05g@gmail.com>,
	Boqun Feng <boqun.feng@gmail.com>
Subject: Re: [PATCH 3/3] lockdep: document MAX_LOCKDEP_CHAIN_HLOCKS calculation
Date: Tue, 6 Aug 2024 14:49:07 +0000	[thread overview]
Message-ID: <ZrI34xNP1Szn1WnB@google.com> (raw)
In-Reply-To: <45ceeb38-06c4-4b8a-8b3f-afe57c891f9a@redhat.com>

On Mon, Aug 05, 2024 at 09:27:52PM -0400, Waiman Long wrote:
> 
> I think it is better to define another macro like
> 
> diff --git a/kernel/locking/lockdep_internals.h
> b/kernel/locking/lockdep_internals.h
> index bbe9000260d0..8805122cc9f1 100644
> --- a/kernel/locking/lockdep_internals.h
> +++ b/kernel/locking/lockdep_internals.h
> @@ -119,7 +119,8 @@ static const unsigned long LOCKF_USED_IN_IRQ_READ =
> 
>  #define MAX_LOCKDEP_CHAINS     (1UL << MAX_LOCKDEP_CHAINS_BITS)
> 
> -#define MAX_LOCKDEP_CHAIN_HLOCKS (MAX_LOCKDEP_CHAINS*5)
> +#define AVG_LOCKDEP_CHAIN_DEPTH         5
> +#define MAX_LOCKDEP_CHAIN_HLOCKS
> (MAX_LOCKDEP_CHAINS*AVG_LOCKDEP_CHAIN_DEPTH)
> 
>  extern struct lock_chain lock_chains[];
> 
> Cheers,
> Longman

Sounds good, I'll add your suggestion for v2. Thanks!

      reply	other threads:[~2024-08-06 14:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-06  1:01 [PATCH 0/3] lockdep: minor config and documentation fixes Carlos Llamas
2024-08-06  1:01 ` [PATCH 1/3] lockdep: fix upper limit for LOCKDEP_*_BITS configs Carlos Llamas
2024-08-06  1:29   ` Waiman Long
2024-08-06  1:01 ` [PATCH 2/3] lockdep: clarify size " Carlos Llamas
2024-08-06  1:36   ` Waiman Long
2024-08-06 14:47     ` Carlos Llamas
2024-08-06 14:52       ` Waiman Long
2024-08-06 17:42         ` Boqun Feng
2024-08-07 14:28           ` Carlos Llamas
2024-08-06  1:01 ` [PATCH 3/3] lockdep: document MAX_LOCKDEP_CHAIN_HLOCKS calculation Carlos Llamas
2024-08-06  1:27   ` Waiman Long
2024-08-06 14:49     ` Carlos Llamas [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZrI34xNP1Szn1WnB@google.com \
    --to=cmllamas@google.com \
    --cc=boqun.feng@gmail.com \
    --cc=hooanon05g@gmail.com \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=will@kernel.org \
    --cc=ying.huang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox