[linux-pm] [PATCH 2/2] Fix console handling during suspend/resume

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Tue, 27 Jun 2006, Benjamin Herrenschmidt wrote:
> 
> I'm not sure actually _why_ we should have irqs off if we do the job
> properly

If we were able to do the job properly, I'd agree.

I just claim that the last few years have shown that we aren't.

I want that last suspend_late/resume_early to be done with interrupts 
disabled exactly because most of the problems I've seen in suspend/resume 
have been due to things like some subsystem calling into a driver that was 
partially shut down, or a shared interrupt happening for a driver that 
can't take it any more etc etc etc.

So for me, the absolutely _humongous_ advantage to doing the last (and the 
very first) phase with irq's off and in single-CPU mode is exactly that 
people _do_ get it wrong.

So I'd much rather have a more limited mode that allows people to 
basically think of suspend as something very controlled where nothing else 
happens, and they can _depend_ on that.

And the thing is, if you want to write a perfect driver, you still have 
that _option_. You don't have to use the late/early suspend if you don't 
want to, as a driver writer. 

I absolutely hate complexity and "perfect". I'd _much_ rather see the 
model be that you're in this really really limited mode when you do the 
final suspend, and have people do bit-twiddling and busy-waits. It may 
sound inconvenient, but the thing is, from a driver writer perspective, I 
think enforcing limitations is actually _good_.

For example, I hate ACPI and EFI with a passion. I actually think that the 
old stupif BIOS is infinitely more preferable as a loader, exactly because 
it's _so_ stupid that people don't try to do something clever in it, and 
don't try to use it. But because of that stupidity it _works_.

Suspend/resume shouldn't need to be "good". It doesn't need 
multi-processing, and the final (and most fragile phases) of turning off 
the core components of the montherboard doesn't need interrupts.

What if the interrupt controller or timers or whatever aren't strictly a 
"parent" of the devices that need it? THAT'S OK.

(It's also more than OK - it's a fact of life on some things. It should be 
ok to shut off the interrupt controller before you shut off some devices, 
and it should be ok to bring core devices up before the interrupt 
controller is even working).

So all of this means that I don't think the system should be "live" during 
the last phase. It should be as dead as humanly possible.

			Linus


[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux