apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Pane <bp...@pacbell.net>
Subject Re: [PATCH] time-space tradeoff (reuse tpool, one CV per worker thread)
Date Sun, 25 Nov 2001 08:32:36 GMT
Justin Erenkrantz wrote:

>[ Moving this part of the discussion to dev@apr. ]
>
>On Fri, Nov 23, 2001 at 03:16:35PM -0800, Brian Pane wrote:
>
>>Thanks.  Here's my patch to optimize away the mutex operations in
>>pools that have been designated thread-private.  With the current
>>worker code, it can eliminate the mutex ops for subrequest pool
>>creation/destruction.  By combining it with your worker redesign,
>>I think we may be able to eliminate the mutexes for the ptrans
>>pool.
>>
>
>Nice idea.  However, I think it might be best to resurrect
>Sander's patch which did a rewrite of the pool code (keeping
>virtually the same API) but made the internal code much cleaner.  
>And, it had thread-private to boot.  (The current pool code has
>threads grafted on to it, so it isn't as clean.)  And, we proved
>it was a performance win, too, I think.
>

Agreed--now might be a good time to revive Sander's pool patch.

The benchmark results for my pool patch show that:

  * Modifying the pool code to reduce mutex contention is
    a good idea.  With the patch applied, we saw a large decrease
    in run queue length and a modest increase in throughput on
    Solaris.

  * My patch isn't ready for production use. There's an apparent
    race condition in my patch that results in rare heap corruption,
    and so far I've been unable to isolate the bug.

Thus I think Sander's patch may be a better choice than mine.

--Brian



Mime
View raw message