[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0j2W5MYJnb4hiDn0OgR1xJZwm4TxVm9o-iw+epXPTp82g@mail.gmail.com>
Date: Thu, 2 Apr 2020 15:33:45 +0200
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Chen Yu <yu.c.chen@...el.com>
Cc: Linux PM <linux-pm@...r.kernel.org>,
Jonathan Corbet <corbet@....net>, Pavel Machek <pavel@....cz>,
Mauro Carvalho Chehab <mchehab+samsung@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
"open list:DOCUMENTATION" <linux-doc@...r.kernel.org>,
Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Len Brown <lenb@...nel.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Randy Dunlap <rdunlap@...radead.org>
Subject: Re: [PATCH][v3] PM / sleep: Add pm_debug_messages boot command control
On Thu, Apr 2, 2020 at 9:58 AM Chen Yu <yu.c.chen@...el.com> wrote:
>
> Debug messages from the system suspend/hibernation infrastructure
> is disabled by default, and can only be enabled after the system
> has boot up via /sys/power/pm_debug_messages. This makes the hibernation
> resume hard to track as it involves system boot up across hibernation.
> There's no chance for software_resume() to track the resume process,
> eg.
>
> Turning on the pm_debug_messages during boot up by appending
> 'pm_debug_messages'.
>
> Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>
> Cc: Len Brown <lenb@...nel.org>
> Cc: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> Cc: Randy Dunlap <rdunlap@...radead.org>
> Signed-off-by: Chen Yu <yu.c.chen@...el.com>
> ---
> v2: According to Randy's suggestion, add the command line
> option to Documentation/admin-guide/kernel-parameters.txt
>
> v3: According to Rafael's suggestion, rename the boot command
> to pm_debug_messages
> ---
> Documentation/admin-guide/kernel-parameters.txt | 3 +++
> kernel/power/main.c | 7 +++++++
> 2 files changed, 10 insertions(+)
>
> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> index ed73df5f1369..3fb9cbee8d28 100644
> --- a/Documentation/admin-guide/kernel-parameters.txt
> +++ b/Documentation/admin-guide/kernel-parameters.txt
> @@ -3720,6 +3720,9 @@
> Override pmtimer IOPort with a hex value.
> e.g. pmtmr=0x508
>
> + pm_debug_messages [SUSPEND,KNL]
> + Enable suspend/resume debug messages during boot up.
> +
> pnp.debug=1 [PNP]
> Enable PNP debug messages (depends on the
> CONFIG_PNP_DEBUG_MESSAGES option). Change at run-time
> diff --git a/kernel/power/main.c b/kernel/power/main.c
> index 69b7a8aeca3b..40f86ec4ab30 100644
> --- a/kernel/power/main.c
> +++ b/kernel/power/main.c
> @@ -535,6 +535,13 @@ static ssize_t pm_debug_messages_store(struct kobject *kobj,
>
> power_attr(pm_debug_messages);
>
> +static int __init pm_debug_messages_setup(char *str)
> +{
> + pm_debug_messages_on = true;
> + return 1;
> +}
> +__setup("pm_debug_messages", pm_debug_messages_setup);
> +
> /**
> * __pm_pr_dbg - Print a suspend debug message to the kernel log.
> * @defer: Whether or not to use printk_deferred() to print the message.
> --
Applied (as 5.7-rc material) with modified subject and changelog, thanks!
Powered by blists - more mailing lists