From owner-freebsd-arch  Wed Nov 22 14: 6:41 2000
Delivered-To: freebsd-arch@freebsd.org
Received: from smtp04.primenet.com (smtp04.primenet.com [206.165.6.134])
	by hub.freebsd.org (Postfix) with ESMTP
	id 1AB1E37B479; Wed, 22 Nov 2000 14:06:39 -0800 (PST)
Received: (from daemon@localhost)
	by smtp04.primenet.com (8.9.3/8.9.3) id PAA23311;
	Wed, 22 Nov 2000 15:02:56 -0700 (MST)
Received: from usr07.primenet.com(206.165.6.207)
 via SMTP by smtp04.primenet.com, id smtpdAAAnCaGrT; Wed Nov 22 15:02:45 2000
Received: (from tlambert@localhost)
	by usr07.primenet.com (8.8.5/8.8.5) id PAA04455;
	Wed, 22 Nov 2000 15:06:15 -0700 (MST)
From: Terry Lambert <tlambert@primenet.com>
Message-Id: <200011222206.PAA04455@usr07.primenet.com>
Subject: Re: Thread-specific data and KSEs
To: eischen@vigrid.com (Daniel Eischen)
Date: Wed, 22 Nov 2000 22:06:15 +0000 (GMT)
Cc: bright@wintelcom.net (Alfred Perlstein),
	jhb@FreeBSD.ORG (John Baldwin),
	jlemon@flugsvamp.com (Jonathan Lemon), arch@FreeBSD.ORG
In-Reply-To: <Pine.SUN.3.91.1001121221431.26351B-100000@pcnet1.pcnet.com> from "Daniel Eischen" at Nov 21, 2000 10:15:28 PM
X-Mailer: ELM [version 2.5 PL2]
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-freebsd-arch@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.ORG

> > > >> %fs and %gs, but no other seg regs.
> > > > 
> > > > All I need is one.
> > > 
> > > Well, %gs would cover x86 and k64.  I think ia64 has several
> > > application registers that are available for OS use and we
> > > could steal one of those.  I'm not sure about the alpha though.
> > 
> > Don't more segment registers cause more overhead for context switches?
> 
> It's just one more register that has to be saved.  I don't
> think it's going to matter much.

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.

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.


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message