All of lore.kernel.org
 help / color / mirror / Atom feed
From: Carl van Schaik <carl@ok-labs.com>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: Thiemo Seufer <ths@networkno.de>, linux-mips@linux-mips.org
Subject: Re: TLS register for NPTL
Date: Tue, 21 Aug 2007 11:53:49 +1000	[thread overview]
Message-ID: <46CA45AD.8080203@ok-labs.com> (raw)
In-Reply-To: <20070820145449.GA11766@linux-mips.org>

Ralf Baechle wrote:
> On Mon, Aug 20, 2007 at 09:06:27AM +0100, Thiemo Seufer wrote:
>
>   
>>> It seems the rdhwr emulation is used/proposed for accessing the thread
>>> word in NPTL.
>>> I've been reading some of the posts from 2005 about this choice of this
>>> and what I have missed is anyone talking about using the "k0" register
>>> for TLS. It seems logical that the kernel could always restore k0 on
>>> returning to user-land and having k1 only for the last part of returning
>>> to user is sufficient. Any reason why this was not looked at?
>>>       
>> The TLB handlers need k0/k1 as well and have no good place to save/restore
>> a register.
>>     
>
> It can be done but would require several extra instructions in the most
> performance sensitive parts of the OS.
>
> Aside, latest MIPS processors support a hardware implementation of rdhwr $29,
> so there is no more emulation overhead for this instruction at full binary
> compatibility.
>   
Ok, I agree that this is probably the best way to go. In the L4
microkernel we have for a long time used k0 (sony did this as well?),
but that was before any rdhwr existed, hence my questions. It should be
easy to change L4 to use rdhwr, or both for an intermediate period of
time which allows us to virtualize Linux mips applications with NPTL.

thanks,
Carl

  reply	other threads:[~2007-08-21  1:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-20  6:59 TLS register for NPTL Carl van Schaik
2007-08-20  8:06 ` Thiemo Seufer
2007-08-20 14:54   ` Ralf Baechle
2007-08-21  1:53     ` Carl van Schaik [this message]
2007-08-21 12:42       ` Ralf Baechle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46CA45AD.8080203@ok-labs.com \
    --to=carl@ok-labs.com \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    --cc=ths@networkno.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.