mirror of https://lore.kernel.org/lkml/
 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>,
	Boqun Feng <boqun.feng@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] locking/semaphore: Use wake_q to wake up processes outside lock critical section
Date: Fri, 22 Sep 2023 20:29:18 -0400	[thread overview]
Message-ID: <79793717-95f8-2bd7-407a-ae547131809d@redhat.com> (raw)
In-Reply-To: <20230922194704.GA40277@noisy.programming.kicks-ass.net>


On 9/22/23 15:47, Peter Zijlstra wrote:
> On Fri, Sep 22, 2023 at 02:45:04PM -0400, Waiman Long wrote:
>
>> I believe early_printk should only be used in the non-SMP boot process. The
>> use of printk() is frequently used for debugging purpose and the insertion
>> of printk at some lock critical section can cause the lockdep splat to come
>> out obscuring the debugging process.
> By default early_printk is disabled somewhere early, but it has a keep
> argument to keep it around.
>
> Anyway, printk() as it exists today is wholly unsuited for debugging.
> There are too many contexts where it will flat out not work. When you
> use early_print with keep then you can use early_printk() instead of
> printk() to debug.
>
> Also, see the patches I pointed John at. Perf would not be what it is
> without those patches.
>
> Serial lines and early printk are not optional. That is, I flat out
> refuse to develop on machines without them.

Thanks for the debugging tip.

BTW, it is not just printk() that can be problematic in some contexts. I 
believe the various WARN*() calls cause the same kind of lockdep problem 
even though these WARN() calls shouldn't be triggered that often

Cheers,
Longman


  reply	other threads:[~2023-09-23  0:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-09 19:28 Waiman Long
2022-09-19 19:49 ` Waiman Long
2023-09-21  0:05 ` John Stultz
2023-09-21  0:37   ` Waiman Long
2023-09-21  7:45   ` Peter Zijlstra
2023-09-21  7:42 ` Peter Zijlstra
2023-09-22 18:45   ` Waiman Long
2023-09-22 19:47     ` Peter Zijlstra
2023-09-23  0:29       ` Waiman Long [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-01-22 19:17 Waiman Long
2025-01-26  2:21 ` Waiman Long
2022-02-10 18:10 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=79793717-95f8-2bd7-407a-ae547131809d@redhat.com \
    --to=longman@redhat.com \
    --cc=boqun.feng@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®