This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB 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: [RFC]: fix for recycled thread ids


On Thu, Mar 18, 2004 at 07:36:25PM -0500, Jeff Johnston wrote:

The following patch fixes a problem when a user application creates a thread shortly after another thread has completed. For nptl, thread ids are addresses. If a thread completes/dies, the tid is available for reuse by a new thread.


Does NPTL re-use the TID quickly, or cycle around the way LT did so
that we only see this under high thread pressure?

Immediatly. Since they are pointers NPTL re-cycles them as soon as they are freed (on the next thread create and, obviously, in preference to allocating a new buffer) -- very different to the linuxthreads model.


As a consequence any heavily threaded app quickly shows the problem - java (esp eclipse) for instance.

Andrew



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