Re: [PATCH] Make AIO conditional on actual need

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Mon, 24 Aug 2009 01:40:27 +1200

Amos Jeffries wrote:
> Amos Jeffries wrote:
>> To fix OpenBSD current build issues we need to resolve one of the
>> older TODO items:
>>
>> TODO: Detect AIO support cleanly.
>>
>> Requires some shuffling + rewrite of configure.in to get this sequence:
>>
>> - detect AIO header + libraries usability
>> - for each component that depends on it...
>> - if auto-enabled and AIO missing. auto-disable instead.
>> - if force-enabled. error message on missing AIO
>> - else enable, and set needs_aio
>> - if needs_aio after all that
>> - define the AIO include and libraries ac_define/ac_subst
>>
>> Q: Is the --with-aio option still useful after that change?
>> A: Yes Gentoo will probably need it to pull libaio in for the build.
>> But it's a non-op for everyone else.
>>
>> I want to get it done shortly, but have other stuff on the plate. If
>> anyone else has time please yell out and give it a go.
>>
>
> So I did find the time anyways...
>
> Attached is a patch which seeks to do the above logics. With the result
> that AIO is only enabled when actualy needed and available.
>
> From what I could tell of the existing stuff in configure.in its likely
> that COSS was the only reason to use AIO. So this is effectively
> disabling AIO in Squid-3.
>
> If anyone knows of another component needing or even making use of POSIX
> AIO this patch will need adjusting to mark that need.
>
> I have not counted AUFS use of AIO since that seems to be done
> separately via DiskThreads and AIOPS.
>
> Amos
>

So... after an IRC tutorial by Robert on how the DiskIO relates to
storage and store types I can see this logic is a little broken.

All the store types _might_ use it if available base don squid.conf, so
making it always build when possible is a Good Idea. Which begs the
question why COSS was the only store to mark it as a dependency in
configure.

Slightly revised patch coming.

Amos

-- 
Please be using
   Current Stable Squid 2.7.STABLE6 or 3.0.STABLE18
   Current Beta Squid 3.1.0.13
Received on Sun Aug 23 2009 - 13:40:39 MDT

This archive was generated by hypermail 2.2.0 : Mon Aug 31 2009 - 12:00:07 MDT