]> git.ipfire.org Git - thirdparty/squid.git/commit
Added shared_memory_locking configuration directive to control mlock(2).
authorAlex Rousskov <rousskov@measurement-factory.com>
Thu, 24 Mar 2016 17:02:25 +0000 (11:02 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Thu, 24 Mar 2016 17:02:25 +0000 (11:02 -0600)
commitc756d517bc402e8a228f8ff38088d055943677f3
tree9dfbdd7619f7844d1a7a5be5f20aea950013440a
parentf5beb6009ecb931a48d167b3ac662d90bee0eb02
Added shared_memory_locking configuration directive to control mlock(2).

Locking shared memory at startup avoids SIGBUS crashes when kernel runs
out of RAM during runtime. Why not enable it by default? Unfortunately,
locking requires privileges and/or much-higher-than-default
RLIMIT_MEMLOCK limits. Thus, requiring locked memory by default is
likely to cause too many complaints, especially since Squid has not
required that before. The default is off, at least for now.

As we gain more experience, we may try to enable locking by default
while making default locking failures non-fatal and warning about
significant [accumulated] locking delays.
src/SquidConfig.h
src/cf.data.pre
src/ipc/mem/Segment.cc
src/ipc/mem/Segment.h
src/tests/testRock.cc