From owner-freebsd-current Thu Jul 11 16: 3:33 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1D63237B401 for ; Thu, 11 Jul 2002 16:03:31 -0700 (PDT) Received: from mail.speakeasy.net (mail14.speakeasy.net [216.254.0.214]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0B35943E52 for ; Thu, 11 Jul 2002 16:03:30 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 11957 invoked from network); 11 Jul 2002 22:47:20 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail14.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 11 Jul 2002 22:47:20 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.11.6/8.11.6) with ESMTP id g6BMlB033534; Thu, 11 Jul 2002 18:47:12 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Date: Thu, 11 Jul 2002 18:47:13 -0400 (EDT) From: John Baldwin To: julian@FreeBSD.org Subject: Thread state Cc: peter@FreeBSD.org, current@FreeBSD.org Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Currently, sparc64 SMP panics before getting out of single user mode because there is an optimization case in cpu_switch() (if we are switching back to the same thread, we just return right away) that doesn't set td_state to TDS_RUNNING. Also, according to Peter, the code in ia64's cpu_switch() doesn't work either. Rather than try to fix this in the assembler though, I think it is easier to just set the thread state once in C at the end of choosethread(). It is a lot easier to maintain down the road. The patch to do this is at http://www.freebsd.org/~jhb/patches/kse_switch.patch It has been tested on sparc64, alpha, and i386 all with SMP. I would like to commit it soonish. Comments? -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message