Thread ID is reused too quickly

Julian Elischer julian at freebsd.org
Tue Nov 2 18:16:33 UTC 2010


On 11/2/10 9:38 AM, David Xu wrote:
> Our kernel thread ID is reused too quickly, is there any way to fix 
> it ?

we could free them into a holding pool, (an array set up as a ring buffer)
with (say) several hundred slots..
until the pool fills up we don't actually give any thread-IDs back and 
when it fills
up we put the ID we are removing into the head of the queue and give 
back the
one that is at the other end of the queue.

I think it would be very easy to implement.. you might even have a 
per-cpu version
if you didn't want a lock or maybe there is a lock already in use we 
can hide it under.


Julian
>
> Regards,
> David Xu
> _______________________________________________
> freebsd-threads at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-threads
> To unsubscribe, send any mail to 
> "freebsd-threads-unsubscribe at freebsd.org"
>



More information about the freebsd-threads mailing list