From owner-freebsd-current Thu Jul 11 16:40:20 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 5DEFA37B400; Thu, 11 Jul 2002 16:40:17 -0700 (PDT) Received: from rwcrmhc51.attbi.com (rwcrmhc51.attbi.com [204.127.198.38]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0539443E52; Thu, 11 Jul 2002 16:40:17 -0700 (PDT) (envelope-from julian@elischer.org) Received: from InterJet.elischer.org ([12.232.206.8]) by rwcrmhc51.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020711234016.YDWV24728.rwcrmhc51.attbi.com@InterJet.elischer.org>; Thu, 11 Jul 2002 23:40:16 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id QAA48788; Thu, 11 Jul 2002 16:21:20 -0700 (PDT) Date: Thu, 11 Jul 2002 16:21:18 -0700 (PDT) From: Julian Elischer To: John Baldwin Cc: julian@FreeBSD.org, peter@FreeBSD.org, current@FreeBSD.org Subject: Re: Thread state In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 On Thu, 11 Jul 2002, John Baldwin wrote: > 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 I want to change the setting to TDS_RUNNING in the C code in choosethread(). It's pointless extra assembler. ALso the test in i386: cpu_switch that tests for TDS_RUNQ should be shot. choosethread() it's possiblethat the idleproc loop startup can aslo be changed to remove teh setting into TDS_RUNQ that I seem to remember being there.. I can make those changes now if you'd like or you can do it if you have your fingers in there now.. > 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 > duh I should read to the end of the email first.. > > It has been tested on sparc64, alpha, and i386 all with SMP. I > would like to commit it soonish. Comments? > put me down as having approved/agreed/applauded/whatever! (but check the idle thread setup first) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message