2019-12-02 20:22:47

by Jonas Meurer

[permalink] [raw]
Subject: [PATCH 0/2] PM: Add a switch for disabling/enabling sync() before suspend

Hello,

Introduce a new run-time sysfs switch to disable/enable sync() before
system suspend. This is useful to avoid races and deadlocks if block
devices have been suspended before, e.g. by 'cryptsetup luksSuspend'.

The second patch changes the behaviour of build-time switch
'CONFIG_SUSPEND_SKIP_SYNC' accordingly, using the build-time switch value
as default for our new run-time switch '/sys/power/sync_on_suspend'.

Jonas Meurer (2):
PM: Add a switch for disabling/enabling sync() before suspend
PM: CONFIG_SUSPEND_SKIP_SYNC sets default for '/sys/power/sync_on_suspend'

Documentation/ABI/testing/sysfs-power | 15 +++++++++++++++
include/linux/suspend.h | 2 ++
kernel/power/Kconfig | 5 ++++-
kernel/power/main.c | 33 +++++++++++++++++++++++++++++++++
kernel/power/suspend.c | 2 +-
5 files changed, 55 insertions(+), 2 deletions(-)


2019-12-11 16:47:14

by Jonas Meurer

[permalink] [raw]
Subject: Re: [PATCH 0/2] PM: Add a switch for disabling/enabling sync() before suspend

Hello,

Jonas Meurer:
> Hello,
>
> Introduce a new run-time sysfs switch to disable/enable sync() before
> system suspend. This is useful to avoid races and deadlocks if block
> devices have been suspended before, e.g. by 'cryptsetup luksSuspend'.
>
> The second patch changes the behaviour of build-time switch
> 'CONFIG_SUSPEND_SKIP_SYNC' accordingly, using the build-time switch value
> as default for our new run-time switch '/sys/power/sync_on_suspend'.
>
> Jonas Meurer (2):
> PM: Add a switch for disabling/enabling sync() before suspend
> PM: CONFIG_SUSPEND_SKIP_SYNC sets default for '/sys/power/sync_on_suspend'
>
> Documentation/ABI/testing/sysfs-power | 15 +++++++++++++++
> include/linux/suspend.h | 2 ++
> kernel/power/Kconfig | 5 ++++-
> kernel/power/main.c | 33 +++++++++++++++++++++++++++++++++
> kernel/power/suspend.c | 2 +-
> 5 files changed, 55 insertions(+), 2 deletions(-)

Any chance to get a review/comment on this patch? What's the next
logical steps to get it merged?

Cheers
jonas

2019-12-12 18:02:53

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [PATCH 0/2] PM: Add a switch for disabling/enabling sync() before suspend

On Wednesday, December 11, 2019 4:59:29 PM CET Jonas Meurer wrote:
> Hello,
>
> Jonas Meurer:
> > Hello,
> >
> > Introduce a new run-time sysfs switch to disable/enable sync() before
> > system suspend. This is useful to avoid races and deadlocks if block
> > devices have been suspended before, e.g. by 'cryptsetup luksSuspend'.
> >
> > The second patch changes the behaviour of build-time switch
> > 'CONFIG_SUSPEND_SKIP_SYNC' accordingly, using the build-time switch value
> > as default for our new run-time switch '/sys/power/sync_on_suspend'.
> >
> > Jonas Meurer (2):
> > PM: Add a switch for disabling/enabling sync() before suspend
> > PM: CONFIG_SUSPEND_SKIP_SYNC sets default for '/sys/power/sync_on_suspend'
> >
> > Documentation/ABI/testing/sysfs-power | 15 +++++++++++++++
> > include/linux/suspend.h | 2 ++
> > kernel/power/Kconfig | 5 ++++-
> > kernel/power/main.c | 33 +++++++++++++++++++++++++++++++++
> > kernel/power/suspend.c | 2 +-
> > 5 files changed, 55 insertions(+), 2 deletions(-)
>
> Any chance to get a review/comment on this patch? What's the next
> logical steps to get it merged?

This is not a super-high priority patchset IMO, but it is in my list of things
to look at.

Thanks!