[squid-dev] [RFC] Fix shared memory initialization, cleanup. Ensure its usability.

Amos Jeffries squid3 at treenet.co.nz
Wed Dec 9 23:24:36 UTC 2015


On 10/12/2015 10:49 a.m., Alex Rousskov wrote:
> On 12/09/2015 02:19 PM, Amos Jeffries wrote:
> 
>>> Questions: Should we add a configuration directive to control whether
>>> mlock(2) is called? If yes, should mlock(2) be called by default?
>>> Should mlock(2) failures be fatal?
> 
>> My answers are no, yes, yes. Since this is a startup thing squid.conf
>> post-processing is probably too late.
> 
> Not sure I understand. Shared memory is not allocated until _after_ we
> parse squid.conf. The allocation code needs to know how much to allocate
> and that depends on squid.conf. mlock() is a part of the shared memory
> allocation code...

Ah. Okay. I was thinking it was allocated early somewhere in the
pre-config setups; Mem::Init, storeFsInit(), Fs::Init(),
StoreFileSystem::SetupAllFs(), Store::Init().


> 
> FWIW, in my description about startup delays, "startup" is everything
> that happens before Squid is ready to handle requests.

Nod.

Amos



More information about the squid-dev mailing list