[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0gqpQTuNN0WpnEd4dAQmnR=BXSoH_w7kkAxOG7xkftW6Q@mail.gmail.com>
Date: Thu, 17 Mar 2022 14:45:11 +0100
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: David Cohen <dacohen@...me>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>,
Pavel Machek <pavel@....cz>, Len Brown <len.brown@...el.com>,
Linux PM <linux-pm@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] PM: fix dynamic debug within pm_pr_debug()
On Sat, Mar 12, 2022 at 5:37 AM David Cohen <dacohen@...me> wrote:
>
> Currently, pm_pr_debug() and pm_deferred_pr_debug() use __pm_pr_debug()
> to filter pm debug messages based on pm_debug_messages_on flag.
> According to __pm_pr_debug() implementation, pm_deferred_pr_debug()
> indirectly calls printk_deferred() within __pm_pr_debug() which doesn't
> support dynamic debug, but pm_pr_debug() indirectly calls pr_debug()
I'm not sure what you mean by pm_pr_debug(). There's no such thing in
the kernel tree.
Assuming that it means pm_pr_dbg(), it doesn't call pr_debug():
#define pm_pr_dbg(fmt, ...) __pm_pr_dbg(false, fmt, ##__VA_ARGS__)
and
void __pm_pr_dbg(bool defer, const char *fmt, ...)
{
...
if (defer)
printk_deferred(KERN_DEBUG "PM: %pV", &vaf);
else
printk(KERN_DEBUG "PM: %pV", &vaf);
And as I said printk(KERN_DEBUG ...) is not equivalent to
pr_debug(...), because it is not dynamic printk().
pm_pr_dbg() is not dynamic printk() on purpose, so they both can be
controlled independently.
Powered by blists - more mailing lists