From owner-freebsd-threads@FreeBSD.ORG Tue Aug 5 15:22:09 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5CE2E37B401; Tue, 5 Aug 2003 15:22:09 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id EEF4C43F3F; Tue, 5 Aug 2003 15:22:08 -0700 (PDT) (envelope-from davidxu@FreeBSD.org) Received: from localhost (davidxu@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h75MM6Up085138; Tue, 5 Aug 2003 15:22:07 -0700 (PDT) (envelope-from davidxu@FreeBSD.org) From: David Xu To: Julian Elischer , Marcel Moolenaar Date: Wed, 6 Aug 2003 06:25:09 +0800 User-Agent: KMail/1.5.2 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200308060625.09817.davidxu@FreeBSD.org> cc: threads@FreeBSD.org Subject: Re: Good news: KSE on ia64 is starting to work X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: davidxu@FreeBSD.org List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Aug 2003 22:22:09 -0000 On Wednesday 06 August 2003 01:22, Julian Elischer wrote: > On Tue, 5 Aug 2003, Marcel Moolenaar wrote: > > Ok, > > > > I have a couple of changes and fixes in my tree that makes KSE on > > ia64 work. I have a couple of questions before I can commit it: > > On ia64 the TP will point to the TDB, as the spec says. > > there is only one case where this negatively impacts > libKSE and that is where the thread is setting itself into a critical > region. > > in i386 it is > > movl #0, %gs(offset) (clear a value in the KCB) > > which can be done atomically > since on ia64 TP points to teh THREAD structure, > we have a second method of setting a critical region which is inthe TCB > instead of being in the KCB, because > > using pdp11 syntax, > offset(TCB)->reg > NULL -> offset2(reg) > > cannot be done atomically and pre-emption may result in teh thread > switching KSEs between teh two instructions. > So on ia64 the critical region is defined as being enterred when > the alternative flag in the TCB is used.. > > David and Dan have more info and patches > I had committed a patch for kernel, the patch introduces a TMF_NOUPCALL flag which can be used for ia64 and alpha in libkse. I think Dan can commit his libkse patch now. David Xu