mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: [Fastboot] /x86_64-machine_shutdown.patch breaks sysrq-b
       [not found]   ` <20050328003621.658ab127.akpm@osdl.org>
@ 2005-03-28  9:15     ` Eric W. Biederman
  2005-03-28  9:40       ` Eric W. Biederman
  0 siblings, 1 reply; 2+ messages in thread
From: Eric W. Biederman @ 2005-03-28  9:15 UTC (permalink / raw)
  To: Andrew Morton; +Cc: fastboot, linux-kernel

Andrew Morton <akpm@osdl.org> writes:

> ebiederm@xmission.com (Eric W. Biederman) wrote:
> >
> > Hmm.  Looking a little more closely sysrq-o calls schedule work
> >  which I assume places the code into a context where it can schedule.
> >  Does that sound like a good approach to rebooting as well?
> 
> Not really - if keventd is stuck somewhere, the reboot attempt won't work.
> 
> One could try schedule_work() once, and on the next attempt do something
> drastic I suppose.
> 
> Or just bypass all the shutdown logic and just reboot the machine, dammit -
> is that not possible?

Given the giant variation in hardware out there I don't know if it
is possible in the general case.  The previous code does
seem to work on most hardware.  But I'm not certain it is desirable to
promise something that only works most of the time from a code
maintenance standpoint.    

>From a maintenance standpoint code that is robust and useful from
in an interrupt context is harder to write.  In addition it sets
up a promise to do something that may well be impossible.  

The bottom line is that the various bits and pieces on the reboot
path have such inconsistent semantics that making a correct
change seems to be nearly impossible.  And irritatingly enough
obviously correct pieces of code like calling set_cpus_allowed()
aren't acceptable because they are not interrupt safe.

The bottom line is that if we want correct code on the reboot
path that hole chunk of the kernel needs to ripped apart and put
back together.

Like I said earlier I am torn on how to approach this.  One part
of me wants code that is maintainable without a lot of work,
another part of me want something that just works for the interesting
cases.

The best way I can see to approach this is to rework the code with
the assumption that only sys_reboot() is the only caller who matters.
Fix everything so that case works properly, and has clear semantics.
And then evolve code that is non longer a maintenance nightmare back
to the best effort machine_restart() code in sysrq-B.  My big problem
is I'm not certain if I have enough time to follow through on my
ambitions.

Eric

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Fastboot] /x86_64-machine_shutdown.patch breaks sysrq-b
  2005-03-28  9:15     ` [Fastboot] /x86_64-machine_shutdown.patch breaks sysrq-b Eric W. Biederman
@ 2005-03-28  9:40       ` Eric W. Biederman
  0 siblings, 0 replies; 2+ messages in thread
From: Eric W. Biederman @ 2005-03-28  9:40 UTC (permalink / raw)
  To: Andrew Morton; +Cc: fastboot, linux-kernel


Looking a little more closely at the users there
is a clear demand in the kernel for some kind of forced
reboot.  Coming from software watchdog timers and the like,
and it makes sense for sysrq-b to call the same thing.

However I'm not at all certain that we want the software is
hosed reboot dammit, to be the same as the graceful reboot
path.

There are a lot of things we can do on the graceful reboot
path like switch to the bootstrap cpu, attempt to make BIOS
calls to perform the reboot etc, that I'm not at all certain
we want to perform on the under more dire circumstances.

If it weren't simply overkill I'd say in the freaked out kernel
reboot case we want to kexec to a sane kernel and then reboot from
there.

Eric

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-03-28  9:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20050324212027.602fd885.akpm@osdl.org>
     [not found] ` <m1ll88nqo7.fsf@ebiederm.dsl.xmission.com>
     [not found]   ` <20050328003621.658ab127.akpm@osdl.org>
2005-03-28  9:15     ` [Fastboot] /x86_64-machine_shutdown.patch breaks sysrq-b Eric W. Biederman
2005-03-28  9:40       ` Eric W. Biederman

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®