You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jim Jagielski <ji...@jaguNET.com> on 2011/01/07 17:01:07 UTC

2.4 and APR_HAS_THREADS, etc

There's a lot of cruft in 2.3/2.4 that, imo at least, doesn't
belong in a 2011-era codebase. For example, 2.3/2.4 should
*require* support for threads, and shared-memory and other
such stuff that we test for and work around.

This is stupid. Even with prefork, we should require that
APR was built with thread support. In other words, if
APR wasn't built with threads (and shared mem, etc),
then httpd shouldn't run in any case.

I propose that this low-hanging fruit be picked...


Re: 2.4 and APR_HAS_THREADS, etc

Posted by Jeff Trawick <tr...@gmail.com>.
On Mon, Jan 10, 2011 at 12:31 PM, William A. Rowe Jr.
<wr...@rowe-clan.net> wrote:
> On 1/10/2011 10:44 AM, Mladen Turk wrote:
>> On 01/07/2011 08:27 PM, Jim Jagielski wrote:
>>>
>>> For right now, APR_HAS_SHARED_MEMORY and APR_HAS_THREADS
>>> should be dropped for 2.3/2.4. I'd be happy with that for
>>> now ;)
>>
>> +1
>>
>> I raised that question few years back and was told
>> that the reason for (at least APR_HAS_THREAD) was
>> not the lack of os support for threads but rather the
>> optimization for prefork. OK ;)
>
> We can agree that some optimizations are appropriate, but that was
> always the wrong test.  ap_mpm_query of AP_MPMQ_IS_THREADED is the
> correct test and always has been.

In the past it was helpful on some platforms to be able to disable
thread support in APR, which required prefork and didn't provide a
run-time capability of deciding whether to be thread-safe.

I guess anyone that wants to use or at least experiment with
--disable-threads builds can stick with a older release.

Re: 2.4 and APR_HAS_THREADS, etc

Posted by "William A. Rowe Jr." <wr...@rowe-clan.net>.
On 1/10/2011 10:44 AM, Mladen Turk wrote:
> On 01/07/2011 08:27 PM, Jim Jagielski wrote:
>>
>> For right now, APR_HAS_SHARED_MEMORY and APR_HAS_THREADS
>> should be dropped for 2.3/2.4. I'd be happy with that for
>> now ;)
> 
> +1
> 
> I raised that question few years back and was told
> that the reason for (at least APR_HAS_THREAD) was
> not the lack of os support for threads but rather the
> optimization for prefork. OK ;)

We can agree that some optimizations are appropriate, but that was
always the wrong test.  ap_mpm_query of AP_MPMQ_IS_THREADED is the
correct test and always has been.


Re: 2.4 and APR_HAS_THREADS, etc

Posted by Mladen Turk <mt...@apache.org>.
On 01/07/2011 08:27 PM, Jim Jagielski wrote:
>
>
> For right now, APR_HAS_SHARED_MEMORY and APR_HAS_THREADS
> should be dropped for 2.3/2.4. I'd be happy with that for
> now ;)
>

+1

I raised that question few years back and was told
that the reason for (at least APR_HAS_THREAD) was
not the lack of os support for threads but rather the
optimization for prefork. OK ;)


Regards
-- 
^TM

Re: 2.4 and APR_HAS_THREADS, etc

Posted by Jim Jagielski <ji...@jaguNET.com>.
On Jan 7, 2011, at 2:00 PM, William A. Rowe Jr. wrote:

> On 1/7/2011 10:01 AM, Jim Jagielski wrote:
>> There's a lot of cruft in 2.3/2.4 that, imo at least, doesn't
>> belong in a 2011-era codebase. For example, 2.3/2.4 should
>> *require* support for threads, and shared-memory and other
>> such stuff that we test for and work around.
> 
> Silly question, but before we debate such things, would you at least
> define 'other such stuff' individually?
> 
> Completely agreed on threads and shm, all binaries I build have used
> these for a decade with httpd since APR 0.9.   I think the 1980's OS's
> are now a historical footnote.
> 

For right now, APR_HAS_SHARED_MEMORY and APR_HAS_THREADS
should be dropped for 2.3/2.4. I'd be happy with that for
now ;)


Re: 2.4 and APR_HAS_THREADS, etc

Posted by "William A. Rowe Jr." <wr...@rowe-clan.net>.
On 1/7/2011 10:01 AM, Jim Jagielski wrote:
> There's a lot of cruft in 2.3/2.4 that, imo at least, doesn't
> belong in a 2011-era codebase. For example, 2.3/2.4 should
> *require* support for threads, and shared-memory and other
> such stuff that we test for and work around.

Silly question, but before we debate such things, would you at least
define 'other such stuff' individually?

Completely agreed on threads and shm, all binaries I build have used
these for a decade with httpd since APR 0.9.   I think the 1980's OS's
are now a historical footnote.