Re: [PATCH] PM: Use pm_pr_dbg() instead of pr_debug().

From: Rafael J. Wysocki
Date: Fri Apr 23 2021 - 08:17:09 EST


On Fri, Apr 23, 2021 at 10:12 AM zhaoxiao <zhaoxiao@xxxxxxxxxxxxx> wrote:
>
> These prints are useful if we're doing PM suspend debugging. Having them
> at pr_debug() level means that we need to either enable DEBUG in this
> file, or compile the kernel with dynamic debug capabilities. Both of
> these options have drawbacks like custom compilation or opting into all
> debug statements being included into the kernel image.

I'm not quite sure what you wanted to say here.

What's wrong with dynamic debug in particular?

> Given that we already have infrastructure to collect PM debugging information with
> CONFIG_PM_DEBUG and friends, let's change the pr_debug usage here to be
> pm_pr_dbg() instead so we can collect the wakeup information in the
> kernel logs.

What wakeup information do you mean?

This is all about manipulating dpm_list and your change would cause
pm_debug_messages to generate quite a bit of noise if enabled early.