DragonFly submit List (threaded) for 2007-08
DragonFly BSD
DragonFly submit List (threaded) for 2007-08
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: [PATCH] [V2] add options to ps(1) to display lwp data


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 14 Aug 2007 16:28:56 -0700 (PDT)

:    proc.p_lwps will soon become a RB-tree to remove the overhead of
:    searching for a new TID when creating a new thread.  Right now
:    the test is O(N) which means that creating lots of new threads 
:    wind up being O(N^2).

    Let me amend this.  There's a shortcut in the fork code so it's actually
    just O(1) for the first 2 billion or so threads.  The signal and select
    code however is O(N).

    In anycase, I've been meaning to change it for a while so I'll be
    putting in the red-black tree for LWPs this week sometime.

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>



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