Threading in the future?

Robert Millan rmh at aybabtu.com
Sat Nov 12 06:18:21 UTC 2005


On Sat, Nov 12, 2005 at 02:28:21AM +0000, Brian M. Carlson wrote:
> Specifically, drow (Daniel Jacobowitz) said:
> > A fully POSIX thread library for your port is a good idea, which
> > LinuxThreads isn't.  However, I am skeptical about how much mileage you'll
> > be able to get from NPTL without duplicating some of its interfaces in
> > FreeBSD.
> 
> So, when glibc drops support for LinuxThreads, what should we do?  Use NPTL?  
> Use libkse/libpthread?  Use libthr?  Write something else?  Do something else 
> I haven't thought of?
> 
> When we have a consensus, I'll be happy to help implement it, but I'd like to 
> know what the plan will be first.

Aurelien is the one who hacked more on Glibc lately, and probably can comment
better.

In the short term, 2.4 is still far and etch will probably release with 2.3, so
if we want to release with etch we could go with LinuxThreads, which according
to Aurelien is much easier (he said he were going to work on this soon, but I
guess he can use some help).

In the long term, my opinion is that we should buy "anything that works".  Pros
with NPTL:

  - POSIX compliant
  - Already integrated on Glibc (I would say this is essential, so for other
    libs we'd have to integrate them as well).
  - Will be easier to port, once kFreeBSD supports it in upstream.  Remember, in
    order for their Linuxulator to work with pure-NPTL libcs, they need to have
    some sort of NPTL support in their kernel.  It might turn out that when we
    need to switch to glibc 2.4 and get rid of LT, we already have such.
    If that support is only in the Linux ABI emulator, we can move it or add the
    stubs for FreeBSD ABI easily.

Cons with NPTL:

  - Not dessigned off the ground for kFreeBSD.  Maybe we get a minor loss in
    performance, but we should expect it's still better than with LinuxThreads.
    Also note the FreeBSD hackers often say their Linux-ulator works faster than
    real Linux for some apps.  Well if they want to be faster with NPTL they'll
    have to do some good work on it.

-- 
Robert Millan



More information about the Glibc-bsd-devel mailing list