From: Cristian Marussi <cristian.marussi@arm.com>
To: Marek Vasut <marek.vasut+renesas@mailbox.org>
Cc: linux-arm-kernel@lists.infradead.org,
"Matthew Wilcox (Oracle)" <willy@infradead.org>,
Andrew Morton <akpm@linux-foundation.org>,
Breno Leitao <leitao@debian.org>,
Cristian Marussi <cristian.marussi@arm.com>,
Edward Adam Davis <eadavis@sina.com>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Kees Cook <kees+treewide@kernel.org>,
Marco Crivellari <marco.crivellari@suse.com>,
Michal Simek <michal.simek@amd.com>,
Oleg Nesterov <oleg@redhat.com>, Pan Chuang <panchuang@vivo.com>,
Pavel Tikhomirov <ptikhomirov@virtuozzo.com>,
Petr Mladek <pmladek@suse.com>, Petr Pavlu <petr.pavlu@suse.com>,
Prasanna Kumar T S M <ptsm@linux.microsoft.com>,
Sudeep Holla <sudeep.holla@kernel.org>,
arm-scmi@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
linux-kernel@vger.kernel.org,
systemd-devel@lists.freedesktop.org
Subject: Re: [PATCH] [RFC] kernel/reboot: Add orderly_suspend() via /sbin/suspend user mode helper
Date: Tue, 17 Nov 2026 16:46:35 +0000 [thread overview]
Message-ID: <avyE65k1dRbELB93@pluto> (raw)
In-Reply-To: <20261117084523.50711-1-marek.vasut+renesas@mailbox.org>
On Tue, Nov 17, 2026 at 09:44:19AM +0100, Marek Vasut wrote:
> Currently, Linux responds to firmware-issued poweroff and reboot requests
> by invoking user mode helpers /sbin/poweroff and /sbin/reboot, which give
> userspace the ability to perform orderly poweroff and reboot according to
> policy set by userspace.
Hi Marek,
>
> This is not the case for firmware-issued suspend request, which directly
> invokes pm_suspend(PM_SUSPEND_MEM), without giving userspace any way to
> determine the suspend policy. This is problematic, because the userspace
> might not be quite ready to suspend right the instant when the suspend
> request from firmware arrives, e.g. because the user is interacting with
> the device and the userspace knows that interaction will end in the near
> future, at which point the system can be suspended perfectly well.
>
> Introduce a user mode helper, /sbin/suspend, which acts the same way as
> the other user mode helpers, and which is invoked when firmware-issued
> suspend request arrives. Userspace can use the helper to apply suspend
> policy, most likely by invoking init system suspend target. In case the
> helper is not present, retain current behavior and suspend immediately.
>
> Note that /sbin/suspend is non-standard. I also considered registering
> an input device and sending KEY_SUSPEND via such a device, but that does
> not seems nice. I also had a look at wake locks, but I don't think this
> is the right tool either. I am sending this as an RFC, because I would
> like to get input on this. I am including change for two platforms, SCMI
> and ZynqMP, which could benefit from this. Thank you for your input !
>
I'll let happily someone decide if this it is worth merging upstream
or not :P....but I would just say that this indeed felt exactly like the
missing bit in the shutdown/reboot kernel framework when I added the
basic reboot/shutdown functionalities to the SCMI Power Control.
If it is really needed to touch base with PID 1 before going suspending
I dont know, but at least this opens the opprtunity for a driver to
choose if userspace has to be involved or not like it is for reboot.
Thanks,
Cristian
prev parent reply other threads:[~2026-11-17 16:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-17 8:44 Marek Vasut
2026-11-17 16:29 ` Bradley Morgan
2026-11-17 16:46 ` Cristian Marussi [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=avyE65k1dRbELB93@pluto \
--to=cristian.marussi@arm.com \
--cc=akpm@linux-foundation.org \
--cc=arm-scmi@vger.kernel.org \
--cc=eadavis@sina.com \
--cc=geert+renesas@glider.be \
--cc=kees+treewide@kernel.org \
--cc=leitao@debian.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=marco.crivellari@suse.com \
--cc=marek.vasut+renesas@mailbox.org \
--cc=michal.simek@amd.com \
--cc=oleg@redhat.com \
--cc=panchuang@vivo.com \
--cc=petr.pavlu@suse.com \
--cc=pmladek@suse.com \
--cc=ptikhomirov@virtuozzo.com \
--cc=ptsm@linux.microsoft.com \
--cc=sudeep.holla@kernel.org \
--cc=systemd-devel@lists.freedesktop.org \
--cc=willy@infradead.org \
/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®