[quagga-dev 3229] Re: [PATCH] non-blocking I/O from client daemons tozebra

Andrew J. Schorr aschorr at telemetry-investments.com
Fri Apr 15 14:25:01 BST 2005

On Thu, Apr 14, 2005 at 09:55:05PM +0100, Paul Jakma wrote:
> Another thing we can try do is make more use of threads. Where 
> there's a function call across some clearly delineated functionality, 
> we could make use of thread_execute. Could help with gathering 
> performance statistics.
> I cant immediately think of any cases though.
> I'm still very puzzled as to how that 83s got attributed to 
> vtysh_read rather than bgp_event..

Hmmm, I tried to follow the code path, and it's quite tricky.
What actually happens when the vty runs the "nei sh"

One thing to keep in mind is that thread_execute still charges the
child thread's execution time to the parent thread.  If you look
in lib/thread.c:thread_call, you will see that the CPU time of the
thread started with a call to thread_execute will also be charged
to the parent thread that was running when thread_execute was
called (unless I am reading the code incorrectly).  I'm not sure
how easy it would be to change this behavior.  Or am I confused?

But the statistics seem pretty clear on the fact that the bgp_event thread
itself never takes a very long time.


More information about the Quagga-dev mailing list