httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <>
Subject Re: some reasons why Apache 2.0 threaded is slower than prefork
Date Fri, 02 Mar 2001 11:52:45 GMT
On Fri, Mar 02, 2001 at 05:33:08AM -0500, Jeff Trawick wrote:
> All I'm asking for is that the list operations have semantics such
> that people have the ability to write a lock-free platform-specific
> version.  
> Heck, an interface like stack_init(), stack_push(), and stack_pop() as
> well as a customizable version of what the stack header looks like
> will work fine.

Hey... that's a neat thought.

I might rename it a bit so people don't implement while thinking "stack" the
whole time. But the concept is good: give me a thing (pop), put this back

An APR type that can get/return void ptrs to a pool would be great. Each OS
or architecture could optimize accordingly, and fall back to APR mutexes if
a faster approach isn't available.

I have no idea what the best API would be, though. Is it truly a void* ? Or
would you also want to allow the thing to make the allocation, so that you
could use Ken's align-on-64-bytes trick? (maybe Ken's trick could be done
internally on a different pointer)

It is certainly worth a look. We'd use CriticalSections on Win32, and I know
OS/2 has a critical section concept (I recall seeing that in the code
somewhere). The other platforms would just fall back to APR mutex. For some
architectures, we could pull up some assembly code. etc etc.


Greg Stein,

View raw message