]> git.ipfire.org Git - thirdparty/squid.git/commit - src/DiskIO/IpcIo/IpcIoFile.cc
Report SMP store queues state (mgr:store_queues) (#690)
authorEduard Bagdasaryan <eduard.bagdasaryan@measurement-factory.com>
Fri, 10 Jul 2020 16:45:50 +0000 (16:45 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Tue, 14 Jul 2020 05:30:42 +0000 (05:30 +0000)
commitd8ee9e8dff4831fa49d2a5ed661ca3ad81b7100e
tree6cbace613083523f6d4fc9d811f85aaa432a8abc
parent6ed687678083f413bb4d57fb5985968204860898
Report SMP store queues state (mgr:store_queues) (#690)

The state of two Store queues is reported: Transients notification queue
(a.k.a. Collapsed Forwarding queue) and SMP I/O request queue (used for
communication with rock diskers). Each worker and disker kid reports its
view of that kid's incoming and outgoing queues state, including a small
sample (up to 7 items) of queued messages. These kid-specific reports
are YAML-compliant.

With the exception of a field labeled "other", each queue report is
self-consistent despite accessing data shared among kids -- the reported
combination of values did exist at the snapshot collection time.

The special "other" field represents a message counter maintained by the
other side of the queue. In most cases, that field will be close to its
correct value, but, due to modifications by the other process of a
non-atomic value, it may be virtually anything. We think it is better to
report (without officially naming) this field because it may be useful
in triage regardless of these caveats. Making the counter atomic just
for these occasional reports is not worth the performance overheads.

Also fixed testStore linking problems (on some platforms) that were
caused by the wrong order of libdiskio and libipc dependencies.
16 files changed:
src/CollapsedForwarding.cc
src/CollapsedForwarding.h
src/DiskIO/IpcIo/IpcIoFile.cc
src/DiskIO/IpcIo/IpcIoFile.h
src/Makefile.am
src/MemObject.cc
src/SquidTime.h
src/icmp/Icmp.cc
src/ipc/Queue.cc
src/ipc/Queue.h
src/log/access_log.cc
src/store.cc
src/tests/stub_CollapsedForwarding.cc
src/tests/stub_IpcIoFile.cc [new file with mode: 0644]
src/tests/stub_time.cc
src/time.cc