From: Pavel Machek <pavel@ucw.cz>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Pingfan Liu <kernelfans@gmail.com>,
Linux PM <linux-pm@vger.kernel.org>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Len Brown <len.brown@intel.com>,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: [PATCHv2] pm/reboot: eliminate race between reboot and suspend
Date: Tue, 31 Jul 2018 11:19:35 +0200 [thread overview]
Message-ID: <20180731091935.GB9836@amd> (raw)
In-Reply-To: <CAJZ5v0gLz4vLiiyfEsMc8FHhm3s0zGNaYRiye-1Tj85BZkv+ag@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1508 bytes --]
On Tue 2018-07-31 11:07:01, Rafael J. Wysocki wrote:
> On Tue, Jul 31, 2018 at 10:51 AM, Pingfan Liu <kernelfans@gmail.com> wrote:
> > At present, "systemctl suspend" and "shutdown" can run in parrallel. A
> > system can suspend after devices_shutdown(), and resume. Then the shutdown
> > task goes on to power off. This causes many devices are not really shut
> > off. Hence replacing reboot_mutex with system_transition_mutex (renamed
> > from pm_mutex) to achieve the exclusion. The renaming of pm_mutex as
> > system_transition_mutex can be better to reflect the purpose of the mutex.
> >
> > Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> > Cc: Len Brown <len.brown@intel.com>
> > Cc: Pavel Machek <pavel@ucw.cz>
> > Cc: Andrew Morton <akpm@linux-foundation.org>
> > Cc: linux-mm@kvack.org
> > Signed-off-by: Pingfan Liu <kernelfans@gmail.com>
> > ---
> > v1 -> v2:
> > rename pm_mutex as system_transition_mutex
>
> LGTM
>
> I can queue this up for 4.19 unless there are objections.
Acked-by: Pavel Machek <pavel@ucw.cz>
[Documentation lines are now too long and multi-line comment coding
style is nonstandard AFAICT, but... lets apply this.]
> > -/* indicate whether PM freezing is in effect, protected by pm_mutex */
> > +/* indicate whether PM freezing is in effect, protected by
> > + * system_transition_mutex
> > + */
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
prev parent reply other threads:[~2018-07-31 9:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-31 8:51 [PATCHv2] pm/reboot: eliminate race between reboot and suspend Pingfan Liu
2018-07-31 9:07 ` Rafael J. Wysocki
2018-07-31 9:19 ` Pavel Machek [this message]
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=20180731091935.GB9836@amd \
--to=pavel@ucw.cz \
--cc=akpm@linux-foundation.org \
--cc=kernelfans@gmail.com \
--cc=len.brown@intel.com \
--cc=linux-mm@kvack.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=rjw@rjwysocki.net \
/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;
as well as URLs for NNTP newsgroup(s).