Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752632AbXEXWMu (ORCPT ); Thu, 24 May 2007 18:12:50 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751386AbXEXWMk (ORCPT ); Thu, 24 May 2007 18:12:40 -0400 Received: from smtp1.linux-foundation.org ([207.189.120.13]:54750 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753190AbXEXWMj (ORCPT ); Thu, 24 May 2007 18:12:39 -0400 Date: Thu, 24 May 2007 15:10:29 -0700 (PDT) From: Linus Torvalds To: Pavel Machek cc: Romano Giannetti , Chris Wright , Chuck Ebbert , Linux Kernel Mailing List , stable@kernel.org, Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, "Rafael J. Wysocki" Subject: Re: pcmcia resume 60 second hang. Re: [patch 00/69] -stable review In-Reply-To: <20070524220017.GC9604@elf.ucw.cz> Message-ID: References: <20070521191612.800400000@sous-sol.org> <4652070D.3090509@redhat.com> <20070521212522.GL3429@sequoia.sous-sol.org> <1179870110.16656.2.camel@localhost> <1180008394.15600.26.camel@localhost> <20070524200435.GA9604@elf.ucw.cz> <20070524220017.GC9604@elf.ucw.cz> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1455 Lines: 45 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/