lkml.org 
[lkml]   [2020]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3] reboot: allow to specify reboot mode via sysfs
On Tue, Nov 10, 2020 at 3:58 PM Petr Mladek <pmladek@suse.com> wrote:
>
> On Mon 2020-11-09 17:45:38, Matteo Croce wrote:
> > From: Matteo Croce <mcroce@microsoft.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@microsoft.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@microsoft.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@microsoft.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@microsoft.com>
> > +Description: CPU number to use to reboot.
> > +
> > +What: /sys/kernel/reboot/force
> > +Date: November 2020
> > +KernelVersion: 5.11
> > +Contact: Matteo Croce <mcroce@microsoft.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@suse.com>
>
> Best Regards,
> Petr

Thanks!
--
per aspera ad upstream

\
 
 \ /
  Last update: 2020-11-10 18:37    [W:0.061 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site