From owner-freebsd-alpha Thu Sep 5 13:31:18 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 8915E37B400 for ; Thu, 5 Sep 2002 13:31:12 -0700 (PDT) Received: from mail.speakeasy.net (mail11.speakeasy.net [216.254.0.211]) by mx1.FreeBSD.org (Postfix) with ESMTP id C4F2D43E72 for ; Thu, 5 Sep 2002 13:31:09 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 22694 invoked from network); 5 Sep 2002 20:31:08 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail11.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 5 Sep 2002 20:31:09 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.5/8.12.5) with ESMTP id g85KV7Bv012383; Thu, 5 Sep 2002 16:31:07 -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 In-Reply-To: <20020905201443.GD13050@cicely9.cicely.de> Date: Thu, 05 Sep 2002 16:31:07 -0400 (EDT) From: John Baldwin To: ticso@cicely.de Subject: Re: ithread preemption Cc: freebsd-alpha@FreeBSD.ORG, Andrew Gallatin 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 05-Sep-2002 Bernd Walter wrote: > 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. Yes, but when you throw preemption into the mix you can switch to the actual ithread when you schedule it, and you don't return to the original interrupted thread until later. -- 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-alpha" in the body of the message