]> git.ipfire.org Git - thirdparty/squid.git/commit
Rework shared queue for IpcIoFile, further optimize IpcIo notifications.
authorDmitry Kurochkin <dmitry.kurochkin@measurement-factory.com>
Tue, 26 Apr 2011 20:39:59 +0000 (00:39 +0400)
committerDmitry Kurochkin <dmitry.kurochkin@measurement-factory.com>
Tue, 26 Apr 2011 20:39:59 +0000 (00:39 +0400)
commitf5591061d55ed2cc7964f82124b4961237be7890
tree2bd124aeb18a5d18782326f292231569bcbc9537
parent15cdbc7cd3261b5925f556a8901284ad13f58faa
Rework shared queue for IpcIoFile, further optimize IpcIo notifications.

The patch implements a FewToFewBiQueue class that allows
communication between two group of processes.  The queue is used
in IpcIoFile and allows to have a single shared queue reader
state for each process (both diskers and workers).  This
continues the optimization started in r11279, see commit log for
more details.

The patch also decreases the number of shared memory segment used
by queues.  Before the change, FewToOneBiQueue used
(2*workerCount + 1) number of segments. Now FewToFewBiQueue uses
just three: for shared metadata, for array of one-to-one queues
and for array of queue readers.
src/DiskIO/IpcIo/IpcIoFile.cc
src/DiskIO/IpcIo/IpcIoFile.h
src/ipc/Queue.cc
src/ipc/Queue.h
src/ipc/mem/Pointer.h