Date: Tue, 3 Oct 2006 08:20:45 +0100 From: Andrea Bittau <a.bittau@cs.ucl.ac.uk> To: Nate Lawson <nate@root.org> Cc: freebsd-acpi@freebsd.org, freebsd-mobile@freebsd.org Subject: Re: hack for getting suspend/resume to half work on an IBM Thinkpad x60s [SMP] Message-ID: <20061003072044.GA9182@shorty.sorbonet.org> In-Reply-To: <4521AF05.50208@root.org> References: <20060921000628.GA1832@shorty.sorbonet.org> <200610021424.18562.jhb@freebsd.org> <20061002223055.GA8217@shorty.sorbonet.org> <4521AF05.50208@root.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Oct 02, 2006 at 05:29:57PM -0700, Nate Lawson wrote: > I disagree. Instead of trying to capture all that register state, > including MSRs, MTRRs, etc., it seems easier just to reinitialize from > scratch. We'll need to do that anyway once suspend-to-disk is > implemented since that kind of resume is equivalent to a hard power cycle. OK so what's the protocol? Force the second CPU into the idle loop, boot it up, and let the scheduler decide what it should run? I tried doing that. It sort of works but the system seemed unstable [page faults] when interrupts were handled by the second core, or some processes were run. One thing I noted is that the CR3 was different from what it was previously. On wakeup, it's idle_ptd and i'm not sure what that means and if that's ok. Also, I don't see how reinitializing from scratch is "easier". You'd have to setup all registers anyway. Furthermore, you'd have to allocate a stack, the per-cpu pages and stuff like that which is already in RAM. [If you use the existing values then it's not "reinitializing from scratch ;D.] Anyway, I don't want to argue because I know really little of this stuff---I just wanted to give a shot at getting s/r working on my laptop ;D I got it ~75% working on my laptop. Now I'm waiting for someone to point out how to wakeup the second core properly and why my mechanism [albeit being a hack] doesn't work.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061003072044.GA9182>