From owner-freebsd-arch Wed Nov 22 14:13:23 2000 Delivered-To: freebsd-arch@freebsd.org Received: from pike.osd.bsdi.com (pike.osd.bsdi.com [204.216.28.222]) by hub.freebsd.org (Postfix) with ESMTP id 7C23E37B479 for ; Wed, 22 Nov 2000 14:13:21 -0800 (PST) Received: from laptop.baldwin.cx (john@jhb-laptop.osd.bsdi.com [204.216.28.241]) by pike.osd.bsdi.com (8.11.0/8.9.3) with ESMTP id eAMMDC059172; Wed, 22 Nov 2000 14:13:12 -0800 (PST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200011222206.PAA04455@usr07.primenet.com> Date: Wed, 22 Nov 2000 14:13:24 -0800 (PST) From: John Baldwin To: Terry Lambert Subject: Re: Thread-specific data and KSEs Cc: arch@FreeBSD.org, (Jonathan Lemon) , (Alfred Perlstein) , (Daniel Eischen) Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 22-Nov-00 Terry Lambert wrote: >> > > >> %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. Ok. Since %fs is only used in the kernel and is saved/restored it might be a good thing to use instead. > 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. > Terry Lambert > terry@lambert.org -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message