diff --git a/cfg.mk b/cfg.mk index 920b6091728fd4f41d23f98e127ac7a4c1dc4bdc..ebfe4a339b533310ffa49e2a337f92e18b4c0c72 100644 --- a/cfg.mk +++ b/cfg.mk @@ -1259,7 +1259,7 @@ exclude_file_name_regexp--sc_prohibit_mixed_case_abbreviations = \ ^src/(vbox/vbox_CAPI.*.h|esx/esx_vi.(c|h)|esx/esx_storage_backend_iscsi.c)$$ exclude_file_name_regexp--sc_prohibit_empty_first_line = \ - ^(README|daemon/THREADS\.txt|src/esx/README|tests/(vmwarever|virhostcpu)data/.*)$$ + ^(README|src/esx/README|tests/(vmwarever|virhostcpu)data/.*)$$ exclude_file_name_regexp--sc_prohibit_useless_translation = \ ^tests/virpolkittest.c diff --git a/daemon/Makefile.am b/daemon/Makefile.am index 42d8f7b3fd7316140dbfee75dc8a09f1f1e0e2ec..658f6c3122e8204b2087bb6e5a838836e08594d1 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -77,7 +77,6 @@ EXTRA_DIST = \ libvirtd.libxl.logrotate.in \ libvirtd.uml.logrotate.in \ test_libvirtd.aug.in \ - THREADS.txt \ $(PODFILES) \ $(MANINFILES) \ $(DAEMON_SOURCES) \ diff --git a/daemon/THREADS.txt b/daemon/THREADS.txt deleted file mode 100644 index ae4e9bad90160717a3109348fc7691ee963d3df8..0000000000000000000000000000000000000000 --- a/daemon/THREADS.txt +++ /dev/null @@ -1,52 +0,0 @@ - - Threading in the libvirtd daemon - ================================ - -To allow efficient processing of RPC requests, the libvirtd daemon -makes use of threads. - - - The process leader. This is the initial thread of control - when the daemon starts running. It is responsible for - initializing all the state, and starting the event loop. - Once that's all done, this thread does nothing except - wait for the event loop to quit, thus indicating an orderly - shutdown is required. - - - The event loop. This thread runs the event loop, sitting - in poll() on all monitored file handles, and calculating - and dispatching any timers that may be registered. When - this thread quits, the entire daemon will shutdown. - - - The workers. These 'n' threads all sit around waiting to - process incoming RPC requests. Since RPC requests may take - a long time to complete, with long idle periods, there will - be quite a few workers running. - -The use of threads obviously requires locking to ensure safety when -accessing/changing data structures. - - - the top level lock is on 'struct qemud_server'. This must be - held before acquiring any other lock - - - Each 'struct qemud_client' object has a lock. The server lock - must be held before acquiring it. Once the client lock is acquired - the server lock can (optionally) be dropped. - - - The event loop has its own self-contained lock. You can ignore - this as a caller of virEvent APIs. - - -The server lock is used in conjunction with a condition variable -to pass jobs from the event loop thread to the workers. The main -event loop thread handles I/O from the client socket, and once a -complete RPC message has been read off the wire (and optionally -decrypted), it will be placed on the 'dx' job queue for the -associated client object. The job condition will be signalled and -a worker will wakeup and process it. - -The worker thread must quickly drop its locks on the server and -client to allow the main event loop thread to continue running -with its other work. Critically important, is that now libvirt -API call will ever be made with the server or client locks held. - --- End