[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFnufp3xfBCwodEmD-sSM7sRWdEv3iDbyBcjYKP_tL70yc+gtQ@mail.gmail.com>
Date: Tue, 10 Nov 2020 18:36:05 +0100
From: Matteo Croce <mcroce@...ux.microsoft.com>
To: Petr Mladek <pmladek@...e.com>
Cc: linux-kernel@...r.kernel.org, Mike Rapoport <rppt@...nel.org>,
Guenter Roeck <linux@...ck-us.net>,
Arnd Bergmann <arnd@...db.de>,
Pavel Tatashin <pasha.tatashin@...een.com>,
Kees Cook <keescook@...omium.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Tyler Hicks <tyhicks@...ux.microsoft.com>
Subject: Re: [PATCH v3] reboot: allow to specify reboot mode via sysfs
On Tue, Nov 10, 2020 at 3:58 PM Petr Mladek <pmladek@...e.com> wrote:
>
> On Mon 2020-11-09 17:45:38, Matteo Croce wrote:
> > From: Matteo Croce <mcroce@...rosoft.com>
> >
> > The kernel cmdline reboot= option offers some sort of control
> > on how the reboot is issued.
> > Add handles in sysfs to allow setting these reboot options, so they
> > can be changed when the system is booted, other than at boot time.
> >
> > The handlers are under <sysfs>/kernel/reboot, can be read to
> > get the current configuration and written to alter it.
> >
> > --- /dev/null
> > +++ b/Documentation/ABI/testing/sysfs-kernel-reboot
> > @@ -0,0 +1,31 @@
> > +What: /sys/kernel/reboot
> > +Date: November 2020
> > +KernelVersion: 5.11
> > +Contact: Matteo Croce <mcroce@...rosoft.com>
> > +Description: Interface to set the kernel reboot mode, similarly to
> > + what can be done via the reboot= cmdline option.
> > + (see Documentation/admin-guide/kernel-parameters.txt)
> > +
>
> s/reboot mode/reboot behavior/
>
> The reboot mode is only one of the modified parameters.
>
Right
>
> > +What: /sys/kernel/reboot/mode
> > +Date: November 2020
> > +KernelVersion: 5.11
> > +Contact: Matteo Croce <mcroce@...rosoft.com>
> > +Description: Reboot mode. Valid values are: cold warm hard soft gpio
> > +
> > +What: /sys/kernel/reboot/type
> > +Date: November 2020
> > +KernelVersion: 5.11
> > +Contact: Matteo Croce <mcroce@...rosoft.com>
> > +Description: Reboot type. Valid values are: bios acpi kbd triple efi pci
> > +
> > +What: /sys/kernel/reboot/cpu
> > +Date: November 2020
> > +KernelVersion: 5.11
> > +Contact: Matteo Croce <mcroce@...rosoft.com>
> > +Description: CPU number to use to reboot.
> > +
> > +What: /sys/kernel/reboot/force
> > +Date: November 2020
> > +KernelVersion: 5.11
> > +Contact: Matteo Croce <mcroce@...rosoft.com>
> > +Description: Force an immediate reboot.
>
> This makes me feel like that the kernel will reboot
> immediately when you write "1". It would deserve a better
> explanation that would make it clear, something like:
>
> Description: Use forced reboot that does not contact the init system.
>
Description: Don't wait for any other CPUs on reboot and avoid
anything that could hang.
>
> Otherwise, it looks good to me. With the two above updates:
>
> Reviewed-by: Petr Mladek <pmladek@...e.com>
>
> Best Regards,
> Petr
Thanks!
--
per aspera ad upstream
Powered by blists - more mailing lists