From: Pavel Machek <pavel@ucw.cz>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Jonas Meurer <jonas@freesources.org>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux PM <linux-pm@vger.kernel.org>,
Len Brown <len.brown@intel.com>,
Tim Dittler <tim.dittler@systemli.org>,
Yannik Sembritzki <yannik@sembritzki.me>
Subject: Re: [PATCH v3] PM: suspend: Add sysfs attribute to control the "sync on suspend" behavior
Date: Thu, 30 Jan 2020 13:19:26 +0100 [thread overview]
Message-ID: <20200130121926.cdz7dtrcbeuodqca@ucw.cz> (raw)
In-Reply-To: <CAJZ5v0gXMkL8Z_=jUvNGoVjDr4s5osO8RNekJ1yg-b+=zi7GSw@mail.gmail.com>
Hi!
> > The sysfs attribute `/sys/power/sync_on_suspend` controls, whether or not
> > filesystems are synced by the kernel before system suspend.
> >
> > Congruously, the behaviour of build-time switch CONFIG_SUSPEND_SKIP_SYNC
> > is slightly changed: It now defines the run-tim default for the new sysfs
> > attribute `/sys/power/sync_on_suspend`.
> >
> > The run-time attribute is added because the existing corresponding
> > build-time Kconfig flag for (`CONFIG_SUSPEND_SKIP_SYNC`) is not flexible
> > enough. E.g. Linux distributions that provide pre-compiled kernels
> > usually want to stick with the default (sync filesystems before suspend)
> > but under special conditions this needs to be changed.
> >
> > One example for such a special condition is user-space handling of
> > suspending block devices (e.g. using `cryptsetup luksSuspend` or `dmsetup
> > suspend`) before system suspend. The Kernel trying to sync filesystems
> > after the underlying block device already got suspended obviously leads
> > to dead-locks. Be aware that you have to take care of the filesystem sync
> > yourself before suspending the system in those scenarios.
> >
> > Signed-off-by: Jonas Meurer <jonas@freesources.org>
>
> Applied as 5.6 material with minor changes in the ABI document, thanks!
For the record, I still believe this is bad idea.
User should not have to tweak variables in /sys for system not to
deadlock with cryptsetup.. and we are stuck with this pretty much
forever.
Pavel
prev parent reply other threads:[~2020-01-30 12:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-16 11:53 Jonas Meurer
2020-01-16 20:49 ` Rafael J. Wysocki
2020-01-19 12:55 ` Jonas Meurer
2020-01-30 12: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=20200130121926.cdz7dtrcbeuodqca@ucw.cz \
--to=pavel@ucw.cz \
--cc=jonas@freesources.org \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=rjw@rjwysocki.net \
--cc=tim.dittler@systemli.org \
--cc=yannik@sembritzki.me \
/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
all inboxes | Powered by JetHome®