From owner-freebsd-arch Tue Nov 21 20:58:48 2000 Delivered-To: freebsd-arch@freebsd.org Received: from io.yi.org (h24-69-199-88.gv.shawcable.net [24.69.199.88]) by hub.freebsd.org (Postfix) with ESMTP id 4C55437B479; Tue, 21 Nov 2000 20:58:42 -0800 (PST) Received: from io.yi.org (localhost.gvcl1.bc.wave.home.com [127.0.0.1]) by io.yi.org (Postfix) with ESMTP id 0C16EBA7A; Tue, 21 Nov 2000 20:58:43 -0800 (PST) X-Mailer: exmh version 2.1.1 10/15/1999 To: Daniel Eischen Cc: Alfred Perlstein , John Baldwin , Jonathan Lemon , arch@FreeBSD.ORG Subject: Re: Thread-specific data and KSEs In-Reply-To: Message from Daniel Eischen of "Tue, 21 Nov 2000 22:33:50 EST." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 21 Nov 2000 20:58:43 -0800 From: Jake Burkholder Message-Id: <20001122045843.0C16EBA7A@io.yi.org> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > On Tue, 21 Nov 2000, Alfred Perlstein wrote: > > * Daniel Eischen [001121 19:15] wrote: > > > > > > > > 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. > > > > No extra TLB faults/invalidations? Aren't segment registers > > somewhat expensive to load? > > Not according to swtch.s, it's just a movl instruction. I don't > need to use the segment register to address anything. I just > need to load it with a value (an index into a global array > of per-KSE structures). > > If I'm being dense, feel free to smack me (just don't take too > much enjoyment in it). Actually this is probably a reason to use %fs, its already saved and restored on entry and exit to the kernel. These are the user-mode register values, so they get saved on the kernel stack in the system call and trap IDTVEC stubs, cpu_switch deals with the kernel mode register values. And yeah, loading the segment registers is expensive comparatively. > > -- > "Some folks are into open source, but me, I'm into open bar." > -- Spencer F. Katt > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-arch" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message