From owner-freebsd-threads@FreeBSD.ORG Fri Jun 20 00:03:54 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 0161737B401; Fri, 20 Jun 2003 00:03:54 -0700 (PDT) Received: from heron.mail.pas.earthlink.net (heron.mail.pas.earthlink.net [207.217.120.189]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5E27E43F93; Fri, 20 Jun 2003 00:03:53 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from user-uinj93o.dialup.mindspring.com ([165.121.164.120] helo=mindspring.com) by heron.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 19TFw6-00052T-00; Fri, 20 Jun 2003 00:03:51 -0700 Message-ID: <3EF2B18E.FB346477@mindspring.com> Date: Fri, 20 Jun 2003 00:02:38 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Marcel Moolenaar References: <20030620031326.GA2260@dhcp01.pn.xcllnt.net> <20030620034647.GB2260@dhcp01.pn.xcllnt.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a4c92f172431006ea57215f4fed25826ee666fa475841a1c7a350badd9bab72f9c350badd9bab72f9c cc: deischen@freebsd.org cc: threads@freebsd.org cc: Julian Elischer Subject: Re: Implementing TLS: step 1 X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jun 2003 07:03:54 -0000 Marcel Moolenaar wrote: > On Thu, Jun 19, 2003 at 11:39:42PM -0400, Daniel Eischen wrote: > > > Q2: Given that libthr has been ported to ia64, what needs to be done > > > to port libkse to ia64 (roughtly)? > > > > libpthread/arch/i386/include/ksd.h: > > libpthread/arch/i386/include/atomic_ops.h > > libpthread/arch/i386/include/pthread_md.h > > libpthread/arch/i386/i386: > > No kernel code? Hmmm, looks like something that's worth giving a > shot. If we have libkse on ia64, we can more easily work on the > issues related to TLS... You guys are missing something. Daniel's earlier point about the IA64 documentation not specifying that the TP point to TLS, rather than a data structure that contains a pointer to TLS is correct (from my reading of both references posted by Marcel). On the other hand, zeroing the TP register in user space to indicate that upcalls are disabled is probably illegal, from the point of vie of that same documentation, so there needs to be another way to do the deed. The problem I forsee here is that it's possible that the SMT cores assign special significance to this register when doing instruction reordering inside the pipeline, and this would definitely break any benefits you would otherwise have obtained from using the register for real threads, if that's the case. Note that this predominantly applies only on UP machines; any MP machines will have a statistical chance of 1 in of breaking the pipelining anyway (IMO, Intel is amining SMT machines at the UP market, more than the SMP market, and SMP users should not expect much benefit: negaffinity will win you more cycles than 1/2-a-CPU-core-when-the-other-1/2-is-idle). -- Terry