Re: pcmcia resume 60 second hang. Re: [patch 00/69] -stable review





On Fri, 25 May 2007, Pavel Machek wrote:

Equally arguably, we should just have a "resume_late()" call that can be
used to do this after everything is up and running.

Yes, we can do that. But userland will see devices "not there" for a
few seconds after boot.

No they won't.

Why the HELL cannot you realize that kernel threads are different?

The right thing to do is AND HAS ALWAYS BEEN, to stop and start user
threads only around the whole thing.

Don't touch those kernel threads. Stop freezing them.

Then, what you do is:
- stop user space
- suspend
- resume
- start user space

and at no point do you touch any kernel threads.

And yes, that "resume" part is multi-phase. We already have
"resume_early()" to do bus-level setup, and then "resume()" to do the
"make devices work". I was suggesting adding a "resume_late()" phase to
let the devices do things that require other devices to work, like doing
firmware loading.

But stopping kernel threads is STUPID. As long as we continue to do that,
it will never _ever_ work.

Yeah, we could re-start the kernel thread before "resume_late()", but the
fact is, they shouldn't have been stopped in the first place.

Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: Back to the future.
    ... On Sunday, 29 April 2007 10:59, Pavel Machek wrote: ... Anyway, the freezing of tasks, including kernel threads, is one of the few ... hibernation/suspend altogether before we know we won't break drivers, ...
    (Linux-Kernel)
  • Re: Damn you, FEDEX! or Nikon D40 lost in Springfield, MO blackhole.
    ... the 2 mp Mavica he had been using with a Nikon D40. ... After shopping around, he got me to order one for him. ... The shipper had it insured, but from what I have read it could take weeks to sort this crap out. ... You may get your insurance from FedEx and a couple weeks later they find it and deliver it. ...
    (alt.photography)
  • Re: Back to the future.
    ... On Saturday, 28 April 2007 10:50, Pavel Machek wrote: ... We freeze user space processes for the reasons that you have quoted above. ... Why we freeze kernel threads in there too is a good question, ... is that an issue in the suspend (aka s2ram) case? ...
    (Linux-Kernel)
  • Re: pcmcia resume 60 second hang. Re: [patch 00/69] -stable review
    ... On Fri, 25 May 2007, Pavel Machek wrote: ... Why the HELL cannot you realize that kernel threads are different? ... Ugh? ...
    (Linux-Kernel)
  • Re: Back to the future.
    ... On Sat, 28 Apr 2007, Pavel Machek wrote: ... Why we freeze kernel threads in there too is a good question, ... they may hold some locks and deadlock suspend ... We could solve a) by carefully auditing suspend lock usage to make ...
    (Linux-Kernel)