From owner-freebsd-arch Wed Nov 22 15:29: 2 2000 Delivered-To: freebsd-arch@freebsd.org Received: from pcnet1.pcnet.com (pcnet1.pcnet.com [204.213.232.3]) by hub.freebsd.org (Postfix) with ESMTP id EFF1237B4C5; Wed, 22 Nov 2000 15:28:57 -0800 (PST) Received: (from eischen@localhost) by pcnet1.pcnet.com (8.8.7/PCNet) id SAA10922; Wed, 22 Nov 2000 18:28:38 -0500 (EST) Date: Wed, 22 Nov 2000 18:28:38 -0500 (EST) From: Daniel Eischen To: John Baldwin Cc: Terry Lambert , arch@FreeBSD.ORG, jlemon@flugsvamp.com, bright@wintelcom.net Subject: Re: Thread-specific data and KSEs In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 22 Nov 2000, John Baldwin wrote: > > On 22-Nov-00 Terry Lambert wrote: > > The %gs register already has to be saved for WINE processes, > > so it's taken (at least when USER_LDT is defined). So there > > would not be an additional context switch for it. > > Ok. Since %fs is only used in the kernel and is saved/restored it might be a > good thing to use instead. I didn't think %fs was saved, but if it is, that's fine with me too. > > I think that if you guys go forward with this, you should do an > > indirect through whatever you end up using. I realize this will > > cost an additional 6 clock cycles, but it will let you expand > > the list of things indefinitely, going forward, instead of having > > to keep a register dedicated for backward compatability, and then > > somehow "grow a new one" when you need to do something similar to > > this again, in the future. > > It will be an indirect if I have any say in it. :) Currently we use %fs in the > kernel to address a segment that contains per-CPU data. I think that if we use > a seg reg, then we should have it address a segment that contains per-KSE data. Didn't Terry want an additional level of indirection? If we have %fs address a segment containing per-KSE data, then I'd like to place pointers to both the KSE struct and the thread struct (2 slots) in this segment (this would remove 1 level of indirection to "current thread"). -- Dan Eischen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message