tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [RFC][PATCH] _UC_TLSBASE for all ports



So, I see various things coming together in this thread, and I would
suggest to fix them all with a change beyound what Emmanuel originaly
proposed:

 - the pthread_self() usage and the binding to a register is a property of
   our libpthread implementation, so it should overwrite setcontext and
   swapcontext with its own implementation, and prevent changing of
   the pthread_self() register (by clearing the _UC_TSLBASE flag before
   passing the context on to the libc version or something)

 - for that to work, we need to do what Emmanuel originaly proposed

 - but also the glusterffs folks should be asked to provide an optional,
   pure pthread based thread pool implementation for portability reasons,
   which will gain the same performance on NetBSD as the swapcontext based
   one.

 - however, we should bring back (under slightly different names, and in libc)
   the old pure userland setcontext (and friends) that we used to have
   in the N:M libpthread. We have the code for all archs, it is tested, and
   it is usefull for situations like this (and the R runtime in pkgsrc, hi
   Ignatios!)

 - manu could then go on and use the new lightweight context functions from
   the previous point to create an improved version of the swapcontext based
   threadpool and speed up glusterffs on NetBSD again


Martin


Home | Main Index | Thread Index | Old Index