This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: DLOPEN and Statically linked executable


On Fri, Jun 21, 2002 at 02:02:10PM +0400, Peter Zaitsev wrote:
> >> IMHO it is just wasting time on your part, your patches to
> >> linuxthreads are so trivial that glibc should do the thing you need by
> >> default.
> 
> WG> This has come up before, there is no general agreement on this; I
> WG> strongly disagree.
> 
> WG> I much prefer to have reasonably large thread stack sizes by default,
> WG> rather than being able to create ridicoulous amounts (>1000) of
> WG> threads (which, if _required_ by the application, I count as a severe
> WG> application bug).
> 
> The question is not in having some special static thread stack size by
> default, but rather possibility to dynamically select it.  Currently
> even if you set thread stack to smaller value it will still be
> allocated on 2M boundaries not allowing to have that much number of
> threads.

Which is not true, as has been mentioned several times.
You can set default thread size with setrlimit(RLIMIT_STACK, XXX); before
first pthread_create as well as using pthread attributes on a thread
by thread basis (unless you are on PPC, m68k or unless you have old kernel on
IA-32).

> Also I would not agree about such architecture.  Thread-per client
> architecture is quite convenient for many applications.   Not only

It may be convenient, but it also means you don't care
at all about wasting system resources (every thread currently eats some
unswappable kernel stack, its userland stack, etc.). Also, on IA-32 there
is hardware limitation that you can have only up to 8192 threads
in one application (though glibc limits this to 1024 threads normally).

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]