All of lore.kernel.org
 help / color / mirror / Atom feed
From: Waiman Long <longman@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>, Will Deacon <will.deacon@arm.com>,
	linux-kernel@vger.kernel.org,
	Bart Van Assche <bvanassche@acm.org>
Subject: Re: [PATCH v2 1/6] locking/lockdep: Track number of zapped classes
Date: Mon, 13 Jan 2020 09:58:29 -0500	[thread overview]
Message-ID: <137a3e75-ca3c-2222-d2af-a6b7bb692b66@redhat.com> (raw)
In-Reply-To: <20200113145542.GV2844@hirez.programming.kicks-ass.net>

On 1/13/20 9:55 AM, Peter Zijlstra wrote:
> On Mon, Dec 16, 2019 at 10:15:12AM -0500, Waiman Long wrote:
>> The whole point of the lockdep dynamic key patch is to allow unused
>> locks to be removed from the lockdep data buffers so that existing
>> buffer space can be reused. However, there is no way to find out how
>> many unused locks are zapped and so we don't know if the zapping process
>> is working properly.
>>
>> Add a new nr_zapped_classes variable to track that and show it in
>> /proc/lockdep_stats if it is non-zero.
>>
>> diff --git a/kernel/locking/lockdep_proc.c b/kernel/locking/lockdep_proc.c
>> index dadb7b7fba37..d98d349bb648 100644
>> --- a/kernel/locking/lockdep_proc.c
>> +++ b/kernel/locking/lockdep_proc.c
>> @@ -336,6 +336,15 @@ static int lockdep_stats_show(struct seq_file *m, void *v)
>>  	seq_printf(m, " debug_locks:                   %11u\n",
>>  			debug_locks);
>>  
>> +	/*
>> +	 * Zappped classes and lockdep data buffers reuse statistics.
>> +	 */
>> +	if (!nr_zapped_classes)
>> +		return 0;
>> +
>> +	seq_puts(m, "\n");
>> +	seq_printf(m, " zapped classes:                %11lu\n",
>> +			nr_zapped_classes);
>>  	return 0;
>>  }
> Why is that conditional?
>
Because I thought zapping class doesn't occur that often. Apparently,
class zapping happens when the system first boots up. I guess that
conditional check isn't needed. I can remove it in the next version.

Cheers,
Longman


  reply	other threads:[~2020-01-13 14:58 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-16 15:15 [PATCH v2 0/6] locking/lockdep: Reuse zapped chain_hlocks entries Waiman Long
2019-12-16 15:15 ` [PATCH v2 1/6] locking/lockdep: Track number of zapped classes Waiman Long
2020-01-13 14:55   ` Peter Zijlstra
2020-01-13 14:58     ` Waiman Long [this message]
2020-01-13 16:02       ` Bart Van Assche
2019-12-16 15:15 ` [PATCH v2 2/6] locking/lockdep: Throw away all lock chains with zapped class Waiman Long
2020-01-13 15:18   ` Peter Zijlstra
2020-01-13 15:44     ` Waiman Long
2020-01-13 16:05     ` Bart Van Assche
2020-01-13 16:15       ` Waiman Long
2019-12-16 15:15 ` [PATCH v2 3/6] locking/lockdep: Track number of zapped lock chains Waiman Long
2019-12-16 15:15 ` [PATCH v2 4/6] locking/lockdep: Reuse freed chain_hlocks entries Waiman Long
2020-01-13 15:51   ` Peter Zijlstra
2020-01-13 16:04     ` Waiman Long
2020-01-13 15:58   ` Peter Zijlstra
2020-01-13 16:24     ` Waiman Long
2020-01-14  9:46       ` Peter Zijlstra
2020-01-14 19:16         ` Waiman Long
2020-01-15 10:44           ` Peter Zijlstra
2020-01-15 19:26             ` Waiman Long
2020-01-13 15:59   ` Peter Zijlstra
2020-01-13 16:03     ` Waiman Long
2019-12-16 15:15 ` [PATCH v2 5/6] locking/lockdep: Decrement irq context counters when removing lock chain Waiman Long
2020-01-14  9:53   ` Peter Zijlstra
2020-01-14 15:04     ` Waiman Long
2019-12-16 15:15 ` [PATCH v2 6/6] locking/lockdep: Display irq_context names in /proc/lockdep_chains Waiman Long
2020-01-06 15:54 ` [PATCH v2 0/6] locking/lockdep: Reuse zapped chain_hlocks entries Waiman Long
2020-01-06 16:50   ` Peter Zijlstra
2020-01-06 16:52     ` Waiman Long

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=137a3e75-ca3c-2222-d2af-a6b7bb692b66@redhat.com \
    --to=longman@redhat.com \
    --cc=bvanassche@acm.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=will.deacon@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.