From owner-freebsd-alpha Thu Sep 5 13:15:26 2002 Delivered-To: freebsd-alpha@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3F0B037B400; Thu, 5 Sep 2002 13:15:23 -0700 (PDT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id CF86043E42; Thu, 5 Sep 2002 13:15:21 -0700 (PDT) (envelope-from ticso@cicely9.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [IPv6:3ffe:400:8d0:301:200:92ff:fe9b:20e7]) by srv1.cosmo-project.de (8.12.5/8.12.5) with ESMTP id g85KFB6K074031 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Thu, 5 Sep 2002 22:15:12 +0200 (CEST) (envelope-from ticso@cicely9.cicely.de) Received: from cicely9.cicely.de (cicely9.cicely.de [IPv6:3ffe:400:8d0:301:210:5aff:fe30:1c1a]) by cicely5.cicely.de (8.12.6/8.12.6) with ESMTP id g85KFANk002149 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Thu, 5 Sep 2002 22:15:10 +0200 (CEST) (envelope-from ticso@cicely9.cicely.de) Received: from cicely9.cicely.de (localhost [127.0.0.1]) by cicely9.cicely.de (8.12.6/8.12.5) with ESMTP id g85KEhD3013214; Thu, 5 Sep 2002 22:14:44 +0200 (CEST) (envelope-from ticso@cicely9.cicely.de) Received: (from ticso@localhost) by cicely9.cicely.de (8.12.6/8.12.6/Submit) id g85KEh4t013213; Thu, 5 Sep 2002 22:14:43 +0200 (CEST) Date: Thu, 5 Sep 2002 22:14:43 +0200 From: Bernd Walter To: Andrew Gallatin Cc: John Baldwin , freebsd-alpha@FreeBSD.ORG Subject: Re: ithread preemption Message-ID: <20020905201443.GD13050@cicely9.cicely.de> Reply-To: ticso@cicely.de References: <15735.44660.835003.901974@grasshopper.cs.duke.edu> <15735.47204.905352.900631@grasshopper.cs.duke.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <15735.47204.905352.900631@grasshopper.cs.duke.edu> X-Operating-System: FreeBSD cicely9.cicely.de 5.0-CURRENT alpha User-Agent: Mutt/1.5.1i Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Thu, Sep 05, 2002 at 04:02:44PM -0400, Andrew Gallatin wrote: > > John Baldwin writes: > > > > On 05-Sep-2002 Andrew Gallatin wrote: > > > > > > John Baldwin writes: > > > > > > > > On 05-Sep-2002 Andrew Gallatin wrote: > > > > > > > > > > I've forgotten -- What are the symptoms of ithread preemption causing > > > > > troubles on alpha? > > > > > > > > Hangs on SMP under load. > > > > > > > > > I have one (probably dumb) idea: Is the ithread preemption code > > > > > guaranteed to switch back to the preempted thread when the ithread > > > > > completes or blocks? And continue through to the end of the interrupt > > > > > dispatch code, returning back to the palcode? > > > > > > > > It is not guaranteed to do that. > > > > > > What keeps you from (eventually) running out of kernel stack space > > > then, as the interrupts keep coming in? > > > > The thread that received the interrupt stays at the high IPL until it > > returns. When you switch to another thread you are on another stack > > and you can take an interrupt ok. When we switch back to an interrupted > > thread, it executes at the raised IPL until it returns back to the PAL > > code. > > OK, so the interrupted thread will (eventually) return back to PAL. OK - I have some basic understandig problems here. Why should ithreads ever return to PAL? Why is IPL raised while an ithread is running? From what I understood before the interrupt handler, which is called from PAL, just triggers the ithread, block the intline and returns. > But, theoritically, under heavy load we could have lots of threads > preempted. And lots of interrupts pending which never returned to > PAL. Are we certain that this doesn't somehow violate assumptions made > by pal? Does any other OS work like this? > > Perhaps we should only allow a small number of preemptions at any one > time. -- B.Walter COSMO-Project http://www.cosmo-project.de ticso@cicely.de Usergroup info@cosmo-project.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message