LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-13-2005, 08:07 PM   #1
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Arrow Slackware and Native POSIX Thread Library (NPTL)


This thread is for questions and comments about Slackware's (new) NPTL support.
Quote:
Fri May 13 12:51:03 PDT 2005

Here's the (I'm sure) long awaited upgrade to Slackware's glibc to include support for NPTL (the Native POSIX Thread Library). NPTL works with newer kernels (meaning 2.6.x, or a 2.4 kernel that is patched to support NPTL, but not an unmodified "vanilla" 2.4 kernel such as Slackware uses) to provide improved performance for threads. This difference can be quite dramatic in some situations. For example, a benchmark test mentioned on Wikipedia started 100,000 threads simultaneously in about 2 seconds on a system using NPTL. The same test using the old Linuxthreads glibc thread support took around 15 minutes to run! For most applications that do not start large numbers of threads the difference will not be so large, but for high traffic servers, databases, or anything that runs large numbers of threads, NPTL should bring big improvements in scalability and performance.
The complete text is in the Slackware-Current ChangeLog.


Last edited by win32sux; 05-14-2005 at 12:56 AM.
 
Old 05-14-2005, 03:48 AM   #2
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Rep: Reputation: 45
This seems like a good enhancement to read further upon. Anyone know where to enable NPTL from in the kernels?

On a side note, i know how pat likes security issues, etc.. but i'm quite shocked and confused to why he didn't include firefox 1.0.4 in the updates...
 
Old 05-15-2005, 09:32 AM   #3
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Original Poster
Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally posted by xushi
On a side note, i know how pat likes security issues, etc.. but i'm quite shocked and confused to why he didn't include firefox 1.0.4 in the updates...
yeah, it's weird - i would have imagined he would have included 1.0.4 in there, considering it's just a binary re-packaging... but quite frankly, i've gotten used to these huge delays on patrick's behalf - and i've gotten to the point where i actually expect delays - so when 1.0.4 was released i made my own slackpack by downloading the 1.0.4 tarball from mozilla.org and the official 1.0.3 slackware buildscript and files from slackware.com... all i changed was the version numbers in the script and in mozilla-firefox-simple.diff.gz and everything seemed to fall into place nicely... there was no way i could wait for patrick to release the update, i mean 1.0.4 fixed some pretty nasty bugs which i wanted patched ASAP:
Quote:
MFSA 2005-44 Privilege escalation via non-DOM property overrides
MFSA 2005-43 "Wrapped" javascript: urls bypass security checks
MFSA 2005-42 Code execution via javascript: IconURL
but whenever he decides to release a slackpack for 1.0.4 i'll replace mine with his, of course...


as for NPTL, yeah, i'm still doing a lot of reading about it... the benchmarks mentioned in the changelog blew my mind...



Last edited by win32sux; 05-15-2005 at 10:05 AM.
 
Old 05-15-2005, 11:18 AM   #4
subgenius
Member
 
Registered: Mar 2004
Distribution: Slackware 9.1
Posts: 41

Rep: Reputation: 15
Thank you for the links.

Yes, it is curious why there was no firefox-1.0.4 release
since the 'build' only takes a few seconds. Most of the time
is either spent downloading the binary, editing the SlackBuild
and the diff and gzipping the package.

Another curiosity - why is the diff gzipped? The file size
difference between gzipped or not is only 138 bytes (434 vs 296).
 
Old 05-15-2005, 11:23 AM   #5
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Original Poster
Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally posted by subgenius
Thank you for the links.
you're welcome...

Quote:
why is the diff gzipped? The file size
difference between gzipped or not is only 138 bytes (434 vs 296).
it's probably gzipped out of custom/tradition... no technical reason AFAIK...
 
Old 05-15-2005, 07:50 PM   #6
jong357
Senior Member
 
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914

Rep: Reputation: 52
So, I can't seem to find any recent NPTL patches for 2.4.xx... Does this mean that 2.4 is completely gone from Slackware on the next release? What a pisser.... I ran into this problem with LFS 6.0... If you build glibc with NPTL your pretty much boned when it comes to running 2.4.... If you rebuild glibc with the older threading model, every single binary and lib on your system breaks... The only patch I could find was for a Redhat 2.4.22 kernel... You get numerous failures during the patch... Sigh... I still need to check out the export LD_ASSUME or whatever it was... Could it be that easy? I rather doubt it... exporting a run-time variable doesn't explain how your going to get past the "FATAL: Kernel too old" message when you bootup even tho you have modutils installed....

Last edited by jong357; 05-15-2005 at 07:53 PM.
 
Old 05-16-2005, 03:14 AM   #7
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Original Poster
Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
yeah, i haven't found any recent NPTL patches for 2.4 either...

BTW guys: patrick just released the firefox 1.0.4 package (finally)...
Quote:
Sun May 15 20:12:03 PDT 2005
xap/mozilla-firefox-1.0.4-i686-1.tgz: Upgraded to firefox-1.0.4.
Two vulnerabilities found in Mozilla Firefox 1.0.3 when combined allow
an attacker to run arbitrary code. For more details, see:
http://www.mozilla.org/security/anno...sa2005-42.html
(* Security fix *)
http://www.slackware.com/changelog/current.php?cpu=i386


Last edited by win32sux; 05-16-2005 at 03:15 AM.
 
Old 05-16-2005, 03:21 AM   #8
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Original Poster
Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
here's an NPTL paper i found which seems interesting:
Quote:
For most application developers, changes between the 2.4 and 2.6 kernel families have little direct impact. However, kernel and system changes that affect how applications spawn and manage other processes and threads are a significant exception to this rule. This whitepaper discusses topics related to migrating existing applications to the 2.6 kernel and the Native POSIX Threading Library (NPTL).
http://linuxdevices.com/articles/AT6753699732.html

if anyone finds any good NPTL info please don't be shy and post it!!!
 
Old 05-16-2005, 07:23 AM   #9
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Rep: Reputation: 45
Quote:
Originally posted by subgenius
Yes, it is curious why there was no firefox-1.0.4 release
since the 'build' only takes a few seconds.
Our requests have been answered =) New changelog (Sunday).

Anyway, from what i keep reading, NTPL support falls mainly within the compiler itself. So i guess we won't see much performance increase until most of the applications are recompiled again with the new C compiler Pat just added.

I wonder if NTPL is used in *BSD and *NIX (Solaris) Operating Systems.

Edit: ... N PPPP T L ... And i just got used to spelling CORBA correctly

Last edited by xushi; 05-16-2005 at 07:26 AM.
 
Old 05-16-2005, 07:30 AM   #10
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Original Poster
Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally posted by xushi
I wonder if NTPL is used in *BSD and *NIX (Solaris) Operating Systems.
yeah i asked myself the same thing... i wonder which operating systems have been making use of NPTL already... i have a feeling FreeBSD and Solaris probably do, but i know nothing about UNIX... anyone know for sure?? it's just curiosity...

also, does anyone know which linux distros have been using NPTL??
 
Old 05-16-2005, 07:41 AM   #11
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Rep: Reputation: 45
Quote:
Originally posted by win32sux
making use of NPTL already
Although redhat, slack, and a few other distros have it enabled now, from my understanding (but don't quote me on this), i doubt any OS can truely take advantage of it until most of the apps are recompiled again.

On a side note,
http://www.devx.com/ibmlinux/Article/27857
Quote:
64-bit Java and NPTL
Threaded 32- and 64-bit development on RHEL3 can be done with NPTL or the older Linux Threads libraries. However, only the NPTL 64-bit threading libraries are supported for Java. LinuxThreads is not supported with the 64-bit version of the IBM JDK 1.4.2 for Linux on POWER.
And see "Solaris thread and NPTL". It looks like Solaris already takes advantage of NPTL
 
Old 05-16-2005, 08:32 AM   #12
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
As a note, I had problem with X (catch signal 11) after glibc upgrade to 2.3.5
I found that nvidia driver (7174) could not load.

I re-installed the nvidia driver with --force-tls=new, that fixed it
 
Old 05-16-2005, 10:25 AM   #13
jong357
Senior Member
 
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914

Rep: Reputation: 52
I had read something similar to that. That sort of confirms my suspicions that the nvidia driver might not be properly detecting like it should. (I have nvidia headaches all the time)...

So this whole NPTL issue is of great concern to me... It's quite possiblly the biggest change to hit slackware, well, ever I guess.... His changelog is misleading in my opinion... He states that it's 2.4 backwards compatable but yet fails to mention that no one is actively backporting NPTL to the stable kernel branch... That effectively kills 2.4.xx for good once the new glibc is integrated into slackware. This upsets me because I really don't like the 2.6 branch. It's still too young and causes many problems for me, as I'm sure it does alot of people out there. I can't even run 2.6 on my new desktop. It barely works on my older laptop.

Anyway... If anyone hears of some recent NPTL patches for 2.4.xx, PLEASE post them here...

I've modeled my recent LFS after Slackware only I built glibc with nptl as mentioned above. I'm now looking at dropping slackware completely and rebuilding LFS 'old-school' to make that my permanent distro. That prospect doesn't appeal to me just because of the sheer ammount of work involved (yet again)...

Thanks.
 
Old 05-16-2005, 10:50 AM   #14
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Rep: Reputation: 45
The thing with the 2.6 kernel is that you really need to take care with your configurations.. And that takes bloody ages to perfect..

I started with this laptop i'm using. Took about a month of constant recompiling to add/remove a few things here and there in order to make it very stable.

Afterwards, i managed to use this .config on 3 other laptops, and 2 other desktops, ranging from really old to recent hardware, with just minor tweaking (changing gfx or cpu in .config)

I still believe there are a few more improvements to be added, but i find it quite stable. And the list mentioned that will be included in the new 2.6.12 looks very promissing indeed.

My only concern is that i see the recent kernels as very bloaty and slightly messy.. This isn't a major concern for now, but i fear it could be in the long run..
 
Old 05-16-2005, 10:57 AM   #15
wpyh
Member
 
Registered: Jun 2004
Location: Beijing
Distribution: Slackware 9.1 but FUBAR with packages I compile myself, and OpenBSD (not exactly a distro) on QEMU
Posts: 153

Rep: Reputation: 35
Quote:
Originally posted by xushi
[B]I wonder if NTPL is used in *BSD and *NIX (Solaris) Operating Systems./B]
I thought NPTL is only for Linux?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Replacing glibc using linuxthreads for glibc using nptl (native positx thread library CestusGW Linux From Scratch 4 01-20-2005 07:26 AM
POSIX thread Programming msriram_linux Programming 4 11-21-2004 03:14 PM
POSIX thread Ivan Lee Programming 2 03-28-2003 03:54 AM
RT Posix thread permissions spaceape Programming 0 01-23-2003 08:50 AM
posix thread sulo Programming 1 02-28-2002 07:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration