From: Mario Limonciello <mario.limonciello@amd.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: xiongxin <xiongxin@kylinos.cn>,
len.brown@intel.com, pavel@ucw.cz, linux-pm@vger.kernel.org
Subject: Re: [PATCH] Revert "include/linux/suspend.h: Only show pm_pr_dbg messages at suspend/resume"
Date: Mon, 22 Apr 2024 10:25:13 -0500 [thread overview]
Message-ID: <7b739eb8-573e-4479-9225-be3d2f4adbff@amd.com> (raw)
In-Reply-To: <CAJZ5v0ggFGSsPKWxowqn89WtLbmXVjUWZvc5KO-ab-UZHagR+Q@mail.gmail.com>
On 4/22/2024 10:18, Rafael J. Wysocki wrote:
> On Mon, Apr 22, 2024 at 5:02 PM Mario Limonciello
> <mario.limonciello@amd.com> wrote:
>>
>> On 4/22/2024 09:45, Rafael J. Wysocki wrote:
>>> On Mon, Apr 22, 2024 at 4:33 PM Mario Limonciello
>>> <mario.limonciello@amd.com> wrote:
>>>>
>>>> On 4/22/2024 04:36, xiongxin wrote:
>>>>> This reverts commit cdb8c100d8a4b4e31c829724e40b4fdf32977cce.
>>>>>
>>>>> In the suspend process, pm_pr_dbg() is called before setting
>>>>> pm_suspend_target_state. As a result, this part of the log cannot be
>>>>> output.
>>>>>
>>>>> pm_pr_dbg() also outputs debug logs for hibernate, but
>>>>> pm_suspend_target_state is not set, resulting in hibernate debug logs
>>>>> can only be output through dynamic debug, which is very inconvenient.
>>>>
>>>> As an alternative, how about exporting and renaming the variable
>>>> in_suspend in kernel/power/hibernate.c and considering that to tell if
>>>> the hibernate process is going on?
>>>>
>>>> Then it should work just the same as it does at suspend.
>>>
>>> Well, this is not the only part that stopped working AFAICS. I'll
>>> queue up the revert.
>>
>> I just tested the revert to see what happens to other drivers but it's
>> going to have more collateral damage.
>>
>> ERROR: modpost: "pm_debug_messages_on"
>> [drivers/platform/x86/amd/pmc/amd-pmc.ko] undefined!
>
> What about removing the "pm_suspend_target_state != PM_SUSPEND_ON"
> part from pm_debug_messages_should_print()?
>
> This should be as good as the revert from the POV of restoring the
> previous functionality.
That would probably help this reported issue but it's going to be REALLY
noisy for the pinctrl-amd driver for anyone that sets
/sys/power/pm_debug_messages.
There is a message in that driver that is emitted whenever a GPIO is
active and pm_debug_messages is set.
It's a really useful message for tracking down which GPIO woke the
system up as the IRQ that is active is the GPIO controller master IRQ
not an IRQ for the GPIO.
But if that change is made anyone who sets /sys/power/pm_debug_messages
is going to see their kernel ring buffer flooded with every since
interrupt associated with an I2C touchpad attention pin (for example).
So if the desire really is to back all this out, I think we need to also
back out other users of pm_pr_dbg() too.
next prev parent reply other threads:[~2024-04-22 15:25 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-22 9:36 [PATCH] Revert "include/linux/suspend.h: Only show pm_pr_dbg messages at suspend/resume" xiongxin
2024-04-22 14:33 ` Mario Limonciello
2024-04-22 14:45 ` Rafael J. Wysocki
2024-04-22 15:01 ` Mario Limonciello
2024-04-22 15:18 ` Rafael J. Wysocki
2024-04-22 15:25 ` Mario Limonciello [this message]
2024-04-22 15:43 ` Rafael J. Wysocki
2024-04-22 15:54 ` Mario Limonciello
2024-04-22 16:04 ` Rafael J. Wysocki
2024-04-23 0:59 ` xiongxin
2024-04-23 3:42 ` Mario Limonciello
2024-04-23 8:17 ` [PATCH] PM: sleep: Optimize the pm_debug_messages_should_print() function xiongxin
2024-04-23 16:52 ` Mario Limonciello
2024-04-30 8:45 ` xiongxin
2024-04-30 14:36 ` Mario Limonciello
2024-05-01 4:45 ` xiongxin
2024-05-02 19:04 ` Mario Limonciello
[not found] ` <1714698149088349.0.seg@mailgw.kylinos.cn>
2024-05-03 1:29 ` xiongxin
2024-06-17 6:54 ` xiongxin
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=7b739eb8-573e-4479-9225-be3d2f4adbff@amd.com \
--to=mario.limonciello@amd.com \
--cc=len.brown@intel.com \
--cc=linux-pm@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=rafael@kernel.org \
--cc=xiongxin@kylinos.cn \
/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