Network Stack Locking

Alan Cox alc at cs.rice.edu
Mon May 24 23:55:42 PDT 2004


>:Sounds a lot like a lot of the Mach IPC optimizations, including their use
>:of continuations during IPC to avoid a full context switch.
>:
>:Robert N M Watson             FreeBSD Core Team, TrustedBSD Projects
>:robert at fledge.watson.org      Senior Research Scientist, McAfee Research
>
>    Well, I like the performance aspects of a continuation mechanism, but
>    I really dislike the memory overhead.  Even a minimal stack is
>    expensive when you multiply it by potentially hundreds of thousands
>    of 'blocking' entities such as PCBs.. say, a TCP output stream.  
>    Because of this the overhead and cache pollution generated by the
>    continuation mechanism increases as system load increases rather
>    then decreases.

When the explicit continuation mechanism was used, the thread's stack
was freed when the thread blocked and a new stack allocated when the
thread was restarted.  Here is a URL:
http://citeseer.ist.psu.edu/draves91using.html.  Notice the mention of
space reduction in the abstract.  It's worth reading.

Alan



More information about the freebsd-arch mailing list