Michael Schnell wrote:
> Of course I do know, but NPTL is based on TLS and TLS is much easier
> to to if you have an MMU that can provide the dedicated per-thread
> memory block automatically the the system switches the MMU
> configuration on a process/task switch. The MMU based implementation
> seems to be available "out of the box" as soon as an MMU-enabled
> Kernel is compiled, while a not MMU based TLS implementation needs
> arch- and compiler- depending code (e.g a processor register can be
> reserved as TLS pointer or a dedicated variable can be used that is
> updated with any process/task switch.
Most arches with MMU use a dedicated register or something like that.
It's not true at all that they use a "default" MMU-enabled TLS scheme
- you need arch-specific kernel support for a context switched memory
block whether it's with an MMU, or non-SMP without an MMU.
> That is why the compiler team usually seems only to care for
> implementing the "__thread" keyword for processors that do have an MMU.
I think it's because they and the kernel team are only interested in
processors with an MMU, and they assume support for those without can
be added by someone else, later.
Also, I think it's because GNU-TLS really depends on ELF and
dynamically loaded libraries - which most no-MMU toolchains don't
support (but some do).
> NIOS only got an MMU recently, so we need to wait for the next
> compiler (gcc 4, about to be released right now) for TLS
> support. With that it would be possible to do TLS (and thus NPTL)
> for MMU-less NIOS systems as well, but I doubt that anybody will
> care, as - other than what I expected - when done in the same FPGA,
> the NIOS with MMU is not (much) slower ("fmax") than the NIOS without.
Maybe not slower, but larger, surely?
-- Jamie
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev