Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1309111
| From | Keerthy <a0393675@ti.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] reboot: Backup orderly_poweroff |
| Date | 2016-01-14 10:30 +0100 |
| Message-ID | <qQMoa-51q-9@gated-at.bofh.it> (permalink) |
| References | <qQsSv-89F-27@gated-at.bofh.it> <qQM4O-4UH-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Ingo, On Thursday 14 January 2016 02:35 PM, Ingo Molnar wrote: > > * Keerthy <j-keerthy@ti.com> wrote: > >> orderly_poweroff is triggered when a graceful shutdown >> of system is desired. This may be used in many critical states of the >> kernel such as when subsystems detects conditions such as critical >> temperature conditions. However, in certain conditions in system >> boot up sequences like those in the middle of driver probes being >> initiated, userspace will be unable to power off the system in a clean >> manner and leaves the system in a critical state. In cases like these, >> the /sbin/poweroff will return success (having forked off to attempt >> powering off the system. However, the system overall will fail to >> completely poweroff (since other modules will be probed) and the system >> is still functional with no userspace (since that would have shut itself >> off). >> >> However, there is no clean way of detecting such failure of userspace >> powering off the system. In such scenarios, it is necessary for a backup >> workqueue to be able to force a shutdown of the system when orderly >> shutdown is not successful after a configurable time period. >> >> Signed-off-by: Keerthy <j-keerthy@ti.com> >> Suggested-by: Eduardo Valentin <edubezval@gmail.com> >> Reported-by: Nishanth Menon <nm@ti.com> >> --- >> Links to previous discussion can be found here: >> >> http://www.spinics.net/lists/linux-omap/msg124925.html >> >> Boot tested on DRA7. >> >> changes in v2: >> >> * Changed #ifdef to #if CONFIG_SHUTDOWN_BACKUP_DELAY_MS >> >> arch/Kconfig | 7 +++++++ >> kernel/reboot.c | 23 ++++++++++++++++++----- >> 2 files changed, 25 insertions(+), 5 deletions(-) >> >> Index: linux/arch/Kconfig >> =================================================================== >> --- linux.orig/arch/Kconfig 2016-01-11 15:26:07.732173131 +0530 >> +++ linux/arch/Kconfig 2016-01-11 15:26:07.728173205 +0530 >> @@ -37,6 +37,18 @@ >> def_bool y >> depends on PERF_EVENTS && HAVE_PERF_EVENTS_NMI && !PPC64 >> >> +config SHUTDOWN_BACKUP_DELAY_MS >> + int "Backup shutdown delay in milli-seconds" >> + default 0 >> + help >> + The number of milliseconds to delay before backup workqueue >> + executes attempting to poweroff the system after the >> + orderly_poweroff function has failed to complete. >> + >> + If set to 0, the backup workqueue is not active. The value >> + should be conservatively configured based on userspace latencies >> + expected for a given system. > > I don't really understand this. In what circumstances can a reboot fail? > > I think that is what should be fixed: a reboot should never fail, instead of > introducing some sort of fragile timeout based method. Here is the complete description of the scenario which was reported by Nishanth who encountered the issue. The link has bootlogs and description of the exact case which led to this patch. http://www.spinics.net/lists/linux-omap/msg124923.html Regards, Keerthy > > Thanks, > > Ingo >
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2] reboot: Backup orderly_poweroff Keerthy <j-keerthy@ti.com> - 2016-01-13 13:40 +0100
Re: [PATCH v2] reboot: Backup orderly_poweroff Ingo Molnar <mingo@kernel.org> - 2016-01-14 10:10 +0100
Re: [PATCH v2] reboot: Backup orderly_poweroff Keerthy <a0393675@ti.com> - 2016-01-14 10:30 +0100
Re: [PATCH v2] reboot: Backup orderly_poweroff Ingo Molnar <mingo@kernel.org> - 2016-01-14 11:10 +0100
Re: [PATCH v2] reboot: Backup orderly_poweroff Keerthy <a0393675@ti.com> - 2016-01-14 11:50 +0100
Re: [PATCH v2] reboot: Backup orderly_poweroff Ingo Molnar <mingo@kernel.org> - 2016-01-14 12:30 +0100
Re: [PATCH v2] reboot: Backup orderly_poweroff One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk> - 2016-01-14 14:30 +0100
Re: [PATCH v2] reboot: Backup orderly_poweroff Russell King - ARM Linux <linux@arm.linux.org.uk> - 2016-01-14 15:30 +0100
csiph-web