From: Anshuman Khandual <khandual@linux.vnet.ibm.com>
To: Joel Stanley <joel@jms.id.au>, Andrew Morton <akpm@linux-foundation.org>
Cc: fabf@skynet.be, Rusty Russell <rusty@rustcorp.com.au>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
Jeremy Kerr <jk@ozlabs.org>
Subject: Re: [PATCH 1/2] kernel/reboot.c: Add orderly_reboot for graceful reboot
Date: Wed, 01 Apr 2015 10:35:35 +0530 [thread overview]
Message-ID: <551B7C9F.5030203@linux.vnet.ibm.com> (raw)
In-Reply-To: <CACPK8XezpWftupa-jgMfiO2B9ozJS07ZKZW7XyWdvE=Z52dF+Q@mail.gmail.com>
On 04/01/2015 08:47 AM, Joel Stanley wrote:
> Hi Andrew,
>
> On Wed, Apr 1, 2015 at 9:09 AM, Andrew Morton <akpm@linux-foundation.org> wrote:
>> > On Mon, 30 Mar 2015 12:45:32 +1030 Joel Stanley <joel@jms.id.au> wrote:
>> >
>>> >> The kernel has orderly_poweroff which allows the kernel to initiate a
>>> >> graceful shutdown of userspace, by running /sbin/poweroff. This adds
>>> >> orderly_reboot that will cause userspace to shut itself down by calling
>>> >> /sbin/reboot.
>>> >>
>>> >> This will be used for shutdown initiated by a system controller on
>>> >> platforms that do not use ACPI.
>> >
>> > gee. There are a lot of callers of emergency_restart(). Why is the
>> > BMC reboot special, and how many of the emergency_restart() callers
>> > really be using orderly_reboot()?
> The BMC reboot is intended to be a graceful shutdown - let userspace
> do it's thing before the system goes down.
>
> Userspace may chose to stop and perform some long, slow teardown
> before it gets around to shutting down. We don't want to move callers
> over orderly_reboot() if they're shutting the system down due to a
> critical failure, eg. printer on fire.
>
> I had a read of the emergency_restart() callers and I didn't see any
> obvious cases for moving over to orderly_reboot().
>
>> > We have /proc/sys/kernel/poweroff_cmd. Should we have
>> > /proc/sys/kernel/reboot_cmd as well? If not,
>> > kernel/reboot.c:reboot_cmd[] can be made static ;)
> I don't think we need it. I'll make reboot_cmd[] static.
Just to have parity with power off command, /proc/sys/kernel/reboot_cmd would
be nice to have.
WARNING: multiple messages have this Message-ID (diff)
From: Anshuman Khandual <khandual@linux.vnet.ibm.com>
To: Joel Stanley <joel@jms.id.au>, Andrew Morton <akpm@linux-foundation.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
linux-kernel@vger.kernel.org, fabf@skynet.be,
Jeremy Kerr <jk@ozlabs.org>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 1/2] kernel/reboot.c: Add orderly_reboot for graceful reboot
Date: Wed, 01 Apr 2015 10:35:35 +0530 [thread overview]
Message-ID: <551B7C9F.5030203@linux.vnet.ibm.com> (raw)
In-Reply-To: <CACPK8XezpWftupa-jgMfiO2B9ozJS07ZKZW7XyWdvE=Z52dF+Q@mail.gmail.com>
On 04/01/2015 08:47 AM, Joel Stanley wrote:
> Hi Andrew,
>
> On Wed, Apr 1, 2015 at 9:09 AM, Andrew Morton <akpm@linux-foundation.org> wrote:
>> > On Mon, 30 Mar 2015 12:45:32 +1030 Joel Stanley <joel@jms.id.au> wrote:
>> >
>>> >> The kernel has orderly_poweroff which allows the kernel to initiate a
>>> >> graceful shutdown of userspace, by running /sbin/poweroff. This adds
>>> >> orderly_reboot that will cause userspace to shut itself down by calling
>>> >> /sbin/reboot.
>>> >>
>>> >> This will be used for shutdown initiated by a system controller on
>>> >> platforms that do not use ACPI.
>> >
>> > gee. There are a lot of callers of emergency_restart(). Why is the
>> > BMC reboot special, and how many of the emergency_restart() callers
>> > really be using orderly_reboot()?
> The BMC reboot is intended to be a graceful shutdown - let userspace
> do it's thing before the system goes down.
>
> Userspace may chose to stop and perform some long, slow teardown
> before it gets around to shutting down. We don't want to move callers
> over orderly_reboot() if they're shutting the system down due to a
> critical failure, eg. printer on fire.
>
> I had a read of the emergency_restart() callers and I didn't see any
> obvious cases for moving over to orderly_reboot().
>
>> > We have /proc/sys/kernel/poweroff_cmd. Should we have
>> > /proc/sys/kernel/reboot_cmd as well? If not,
>> > kernel/reboot.c:reboot_cmd[] can be made static ;)
> I don't think we need it. I'll make reboot_cmd[] static.
Just to have parity with power off command, /proc/sys/kernel/reboot_cmd would
be nice to have.
next prev parent reply other threads:[~2015-04-01 5:05 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-30 2:15 [PATCH 1/2] kernel/reboot.c: Add orderly_reboot for graceful reboot Joel Stanley
2015-03-30 2:15 ` Joel Stanley
2015-03-30 2:15 ` [PATCH 2/2] powerpc/powernv: Reboot when requested by firmware Joel Stanley
2015-03-30 2:15 ` Joel Stanley
2015-03-30 5:32 ` Michael Ellerman
2015-03-30 5:32 ` Michael Ellerman
2015-03-31 22:39 ` [PATCH 1/2] kernel/reboot.c: Add orderly_reboot for graceful reboot Andrew Morton
2015-03-31 22:39 ` Andrew Morton
2015-04-01 3:17 ` Joel Stanley
2015-04-01 3:17 ` Joel Stanley
2015-04-01 5:05 ` Anshuman Khandual [this message]
2015-04-01 5:05 ` Anshuman Khandual
2015-04-01 4:52 ` Anshuman Khandual
2015-04-01 4:52 ` Anshuman Khandual
2015-04-01 5:03 ` Andrew Morton
2015-04-01 5:03 ` Andrew Morton
2015-04-01 5:05 ` Andrew Morton
2015-04-01 5:32 ` Joel Stanley
2015-04-01 5:32 ` Joel Stanley
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=551B7C9F.5030203@linux.vnet.ibm.com \
--to=khandual@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=fabf@skynet.be \
--cc=jk@ozlabs.org \
--cc=joel@jms.id.au \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=rusty@rustcorp.com.au \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.