Coda File System

Re: coda uses its own threads implementation???

From: Jan Harkes <>
Date: Tue, 3 Aug 1999 11:27:20 -0400
On Tue, Aug 03, 1999 at 01:19:05AM -0600, Lou Langholtz wrote:
> Sorry about this question, I imagine I've just missed some obvious
> pre-processor or makefile directive for this....
> It seems like Coda uses its own threads implemention as seen in
> lib-src/mlwp/*. These files seem to be referenced as OLDLWP and there's
> nothing more than a macro define that I can find for a
> NEWLWP (libnewlwp.a in the lib-src/mlwp/ Can the LWP API be
> re-written to use existing threads libraries like posix threads instead?
> Wouldn't that make the code easier to port?
> Thoughts? Comments? RTFM suggestions with the right page to read? Ideas?
> Thanks!

Already done that, the biggest problem is that Coda assumes co-routines,
and has problems with true preemptive/concurrent threads, I put a
lwp-compatible layer on top of pthreads, with a run_mutex etc. Context
switching is about 10x slower (50us vs 5us), debugging is a little bit
easier because gdb can switch to a different thread, and it actually is
less portable because there is no pthread library for Windows ;)

Maybe there is a slight performance/responsiveness win when some threads
such as the RPC2/SFTP SocketListeners and the rvm_truncation thread are
rewritten to be fully concurrent.

Last weekend I also looked at a possible `hybrid' solution, where the
LWP package would be running on top of 1 pthread. But that failed
miserably because thread specific data is placed on the stack, and LWP
tends to mess around with the stacks.

Received on 1999-08-03 11:28:16