From: Boqun Feng <boqun.feng@gmail.com>
To: Waiman Long <llong@redhat.com>
Cc: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>,
mingo@kernel.org, linux-kernel@vger.kernel.org,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>, Will Deacon <will@kernel.org>
Subject: Re: [PATCH] lockdep: Use info level for lockdep initial info messages
Date: Wed, 9 Oct 2024 15:45:30 -0700 [thread overview]
Message-ID: <ZwcHitGNM0cDG5M5@boqun-archlinux> (raw)
In-Reply-To: <8d2becc9-a8cd-4352-a338-7fadf9460793@redhat.com>
On Mon, Oct 07, 2024 at 09:05:25AM -0400, Waiman Long wrote:
> On 10/7/24 2:54 AM, Jiri Slaby (SUSE) wrote:
> > All those:
> > Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
> > ... MAX_LOCKDEP_SUBCLASSES: 8
> > ... MAX_LOCK_DEPTH: 48
> > ... MAX_LOCKDEP_KEYS: 8192
> > and so on are dumped with the KERN_WARNING level. It is due to missing
> > KERN_* annotation.
> >
> > Use pr_info() instead of bare print() to dump the info with the info
> > level.
> >
> > Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
> > Cc: Peter Zijlstra <peterz@infradead.org>
> > Cc: Ingo Molnar <mingo@redhat.com>
> > Cc: Will Deacon <will@kernel.org>
> > Cc: Waiman Long <longman@redhat.com>
> > Cc: Boqun Feng <boqun.feng@gmail.com>
> > ---
> > kernel/locking/lockdep.c | 22 +++++++++++-----------
> > 1 file changed, 11 insertions(+), 11 deletions(-)
> >
> > diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
> > index 536bd471557f..ae8750157099 100644
> > --- a/kernel/locking/lockdep.c
> > +++ b/kernel/locking/lockdep.c
> > @@ -6576,17 +6576,17 @@ EXPORT_SYMBOL_GPL(lockdep_unregister_key);
> > void __init lockdep_init(void)
> > {
> > - printk("Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar\n");
> > + pr_info("Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar\n");
> > - printk("... MAX_LOCKDEP_SUBCLASSES: %lu\n", MAX_LOCKDEP_SUBCLASSES);
> > - printk("... MAX_LOCK_DEPTH: %lu\n", MAX_LOCK_DEPTH);
> > - printk("... MAX_LOCKDEP_KEYS: %lu\n", MAX_LOCKDEP_KEYS);
> > - printk("... CLASSHASH_SIZE: %lu\n", CLASSHASH_SIZE);
> > - printk("... MAX_LOCKDEP_ENTRIES: %lu\n", MAX_LOCKDEP_ENTRIES);
> > - printk("... MAX_LOCKDEP_CHAINS: %lu\n", MAX_LOCKDEP_CHAINS);
> > - printk("... CHAINHASH_SIZE: %lu\n", CHAINHASH_SIZE);
> > + pr_info("... MAX_LOCKDEP_SUBCLASSES: %lu\n", MAX_LOCKDEP_SUBCLASSES);
> > + pr_info("... MAX_LOCK_DEPTH: %lu\n", MAX_LOCK_DEPTH);
> > + pr_info("... MAX_LOCKDEP_KEYS: %lu\n", MAX_LOCKDEP_KEYS);
> > + pr_info("... CLASSHASH_SIZE: %lu\n", CLASSHASH_SIZE);
> > + pr_info("... MAX_LOCKDEP_ENTRIES: %lu\n", MAX_LOCKDEP_ENTRIES);
> > + pr_info("... MAX_LOCKDEP_CHAINS: %lu\n", MAX_LOCKDEP_CHAINS);
> > + pr_info("... CHAINHASH_SIZE: %lu\n", CHAINHASH_SIZE);
> > - printk(" memory used by lock dependency info: %zu kB\n",
> > + pr_info(" memory used by lock dependency info: %zu kB\n",
> > (sizeof(lock_classes) +
> > sizeof(lock_classes_in_use) +
> > sizeof(classhash_table) +
> > @@ -6604,12 +6604,12 @@ void __init lockdep_init(void)
> > );
> > #if defined(CONFIG_TRACE_IRQFLAGS) && defined(CONFIG_PROVE_LOCKING)
> > - printk(" memory used for stack traces: %zu kB\n",
> > + pr_info(" memory used for stack traces: %zu kB\n",
> > (sizeof(stack_trace) + sizeof(stack_trace_hash)) / 1024
> > );
> > #endif
> > - printk(" per task-struct memory footprint: %zu bytes\n",
> > + pr_info(" per task-struct memory footprint: %zu bytes\n",
> > sizeof(((struct task_struct *)NULL)->held_locks));
> > }
>
> Make sense!
>
> Reviewed-by: Waiman Long <longman@redhat.com>
>
Thanks!
Queued in lockdep tree:
https://git.kernel.org/pub/scm/linux/kernel/git/boqun/linux.git/log/?h=lockdep-for-tip
will send a PR to tip between -rc3 and -rc4.
Regards,
Boqun
next prev parent reply other threads:[~2024-10-09 22:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-07 6:54 [PATCH] lockdep: Use info level for lockdep initial info messages Jiri Slaby (SUSE)
2024-10-07 13:05 ` Waiman Long
2024-10-09 22:45 ` Boqun Feng [this message]
2024-10-22 21:53 ` [tip: locking/core] " tip-bot2 for Jiri Slaby (SUSE)
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=ZwcHitGNM0cDG5M5@boqun-archlinux \
--to=boqun.feng@gmail.com \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llong@redhat.com \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=will@kernel.org \
/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.