Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Mar 2007 12:13:28 -0400
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        Tijl Coosemans <tijl@ulyssis.org>
Cc:        Alexander Leidinger <Alexander@leidinger.net>, freebsd-emulation@FreeBSD.org, kib@FreeBSD.org, rdivacky@FreeBSD.org
Subject:   Re: 2.6.16 for linuxulator & 7.0 release
Message-ID:  <200703191213.31197.jkim@FreeBSD.org>
In-Reply-To: <200703171429.25551.tijl@ulyssis.org>
References:  <20070316120038.2iizia24mc4wcw8s@webmail.leidinger.net> <200703171429.25551.tijl@ulyssis.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday 17 March 2007 09:29 am, Tijl Coosemans wrote:
> On Friday 16 March 2007 12:00:38 Alexander Leidinger wrote:
> > In p4 we have the futex/TLS stuff for amd64 but because of the
> > futexes not completely right part it is not committed to current
> > yet. As we already have the futex and TLS stuff for i386 on a
> > similar level in current, I would say we should go ahead and sync
> > the amd64 stuff. It is not used by default, so we don't break
> > existing linux stuff and we get the benefit of more people being
> > able to have a look at it and play with it. So what are your
> > opinions, shall we give jkim@ the green light to MFp4 the
> > futex/TLS stuff?
>
> You should let an amd64 guru review the tls part in imho. I don't
> think you can remove these lines for instance: (from
> linuxolator-p4.diff)
>
> ---  sys/amd64/amd64/cpu_switch.S.orig
> +++  sys/amd64/amd64/cpu_switch.S
> @@ -104,11 +104,12 @@
>  	testl	$PCB_32BIT,PCB_FLAGS(%r8)
>  	jz	1f				/* no, skip over */
>
> -	/* Save segment selector numbers */
> -	movl	%ds,PCB_DS(%r8)
> -	movl	%es,PCB_ES(%r8)
> -	movl	%fs,PCB_FS(%r8)
> [...]
> -	/* Restore segment selector numbers */
> -	movl	PCB_DS(%r8),%ds
> -	movl	PCB_ES(%r8),%es
> -	movl	PCB_FS(%r8),%fs

Actually it was dead code, i.e., PCB_32BIT flag was never set from 
anywhere at all.  I believe it was part of peter's experiment, which 
was never materialized:

http://docs.freebsd.org/cgi/mid.cgi?200405162243.i4GMhvhh037147

Believe me, I had to dig through CVS logs and P4 hammer branch for 
days to find if there was any indication that he might do something 
about it but it seemed he didn't finish his 'tinkering'.  So, I just 
reused the flag to save/restore %gs and the corresponding GDT entry 
and remove the 'dead' code.  It was hell confusing for me from the 
beginning, so your confusion is well understandable.

Jung-uk Kim



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