Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Nov 2000 10:53:16 -0800 (PST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Marius Bendiksen <mbendiks@eunet.no>
Cc:        arch@FreeBSD.org, Jonathan Lemon <jlemon@flugsvamp.com>, Daniel Eischen <eischen@vigrid.com>, Alfred Perlstein <bright@wintelcom.net>
Subject:   Re: Thread-specific data and KSEs
Message-ID:  <XFMail.001127105316.jhb@FreeBSD.org>
In-Reply-To: <Pine.BSF.4.05.10011270847060.54186-100000@login-1.eunet.no>

next in thread | previous in thread | raw e-mail | index | archive | help

On 27-Nov-00 Marius Bendiksen wrote:
>> > 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?
> 
> Upon loading a task state (with ltr or a gate), you will restore all
> segment registers from the tss, regardless of their content, and a load of
> the shadow portion of the segment will be attempted anyway. I don't think
> this is the right place to shave off cycles, nor do I think the speed is
> even the most relevant issue for this extension, but rather the abuse of
> segments that are ment to hold real data.

Erm, we don't use task gates or a TSS for our task switches.  Go look at
cpu_switch() in sys/i386/i386/swtch.s.  %fs and %gs are intended to be used for
per-CPU data and thread-local storage, which is why x86-64 keeps them around
even after axeing %cs, %ds, %es, and %ss.

> Marius

-- 

John Baldwin <jhb@FreeBSD.org> -- 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.001127105316.jhb>