Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
NPTL
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
bos_mindwarp
Apprentice
Apprentice


Joined: 19 Oct 2002
Posts: 275
Location: stockholm, sweden

PostPosted: Thu Apr 03, 2003 1:44 pm    Post subject: NPTL Reply with quote

Since gentoo has glibc > 2.3 should it have NPTL(native POSIX thread library)?
Or is there a way of enabling it somehow?
Back to top
View user's profile Send private message
CoronaLover
Retired Dev
Retired Dev


Joined: 20 Jun 2002
Posts: 163
Location: Rosh-ha'ayin, Israel

PostPosted: Thu Apr 03, 2003 6:52 pm    Post subject: Reply with quote

Gentoo has NPTL support in the unstable branch, just make sure you have "nptl" in USE.
Back to top
View user's profile Send private message
skuld
n00b
n00b


Joined: 13 Oct 2002
Posts: 69

PostPosted: Thu Apr 03, 2003 7:46 pm    Post subject: Reply with quote

What are the prerequisitives to use NPTL ?

I'm trying to compile glibc with nptl support, and I get this :

Code:

>>> md5 ;-) nptl-0.29.tar.bz2
 * You have "nptl" in your USE, but your kernel version or
 * architecture do not support it!
>>> Unpacking source...


If I bypass this warning, may I break my system ?
Back to top
View user's profile Send private message
CoronaLover
Retired Dev
Retired Dev


Joined: 20 Jun 2002
Posts: 163
Location: Rosh-ha'ayin, Israel

PostPosted: Thu Apr 03, 2003 8:31 pm    Post subject: Reply with quote

To use NPTL you need:
1. GCC 3.2.2-r2.
2. running Linux >=2.5.50.
3. /usr/src/linux symlink pointing to >=2.5.50 kernel sources.
Back to top
View user's profile Send private message
Rhino
Apprentice
Apprentice


Joined: 12 Feb 2003
Posts: 177

PostPosted: Thu Apr 03, 2003 8:32 pm    Post subject: Reply with quote

skuld wrote:
What are the prerequisitives to use NPTL ?

I'm trying to compile glibc with nptl support, and I get this :

Code:

>>> md5 ;-) nptl-0.29.tar.bz2
 * You have "nptl" in your USE, but your kernel version or
 * architecture do not support it!
>>> Unpacking source...


If I bypass this warning, may I break my system ?


a 2.5.x kernel and gcc-3.2.2-r2 or r3.
_________________
With sufficient thrust, pigs fly just fine.
[ RFC 1925 ]
Back to top
View user's profile Send private message
bos_mindwarp
Apprentice
Apprentice


Joined: 19 Oct 2002
Posts: 275
Location: stockholm, sweden

PostPosted: Thu Apr 03, 2003 9:57 pm    Post subject: Reply with quote

cool thx =)
Back to top
View user's profile Send private message
bos_mindwarp
Apprentice
Apprentice


Joined: 19 Oct 2002
Posts: 275
Location: stockholm, sweden

PostPosted: Fri Apr 04, 2003 2:23 am    Post subject: Reply with quote

Ok, i installed mm-sources kernel, and re-emerged glibc.

The weird thing is I can spawn 256 threads with NPTL, and I could spawn 1024 threads with the old library?
Back to top
View user's profile Send private message
skuld
n00b
n00b


Joined: 13 Oct 2002
Posts: 69

PostPosted: Fri Apr 04, 2003 5:56 am    Post subject: Reply with quote

Rhino wrote:
a 2.5.x kernel and gcc-3.2.2-r2 or r3.


OK, thanks.

I just have to wait for 2.6 kernel :-)
Back to top
View user's profile Send private message
bos_mindwarp
Apprentice
Apprentice


Joined: 19 Oct 2002
Posts: 275
Location: stockholm, sweden

PostPosted: Fri Apr 04, 2003 8:00 am    Post subject: Reply with quote

ok I found it (stupid me)
max thread count depends on following:
- the value in /proc/sys/kernel/threads-max
- amount of RAM
- stack size (default 8MB i think, tunable with: ulimit -s 64, for 64K stack size, toy with value for reaching your optimal)
Back to top
View user's profile Send private message
asimon
l33t
l33t


Joined: 27 Jun 2002
Posts: 979
Location: Germany, Old Europe

PostPosted: Fri Apr 04, 2003 8:51 am    Post subject: Reply with quote

skuld wrote:


I just have to wait for 2.6 kernel :-)


The kernel from Red Hat 9 -- which is based on 2.4.20 -- should do fine (although the glibc ebuild has to be changed for this because it checks for kernel version >= 2.5.50 and there is no ebuild yet for this kernel).
Back to top
View user's profile Send private message
barlad
l33t
l33t


Joined: 22 Feb 2003
Posts: 673

PostPosted: Fri Apr 04, 2003 10:13 am    Post subject: Reply with quote

Is there any profit in using NPTL? improved performances?
Back to top
View user's profile Send private message
asimon
l33t
l33t


Joined: 27 Jun 2002
Posts: 979
Location: Germany, Old Europe

PostPosted: Fri Apr 04, 2003 10:33 am    Post subject: Reply with quote

barlad wrote:
Is there any profit in using NPTL? improved performances?


Yes, much better performance (among other things), especially on multi-processor machines. But most applications will not enjoy any better performance. Only those which utilize Posix threads. See the NPTL design draft for more information.
Back to top
View user's profile Send private message
knittel
n00b
n00b


Joined: 29 Nov 2002
Posts: 50

PostPosted: Fri Apr 04, 2003 1:37 pm    Post subject: Reply with quote

As asked in another post - for the 2.4 Kernel people, what about adding NGPT ?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum