From e12f3e68c06549bbf334e32f3505d2206b196c35 Mon Sep 17 00:00:00 2001 From: f18m Date: Tue, 17 Oct 2017 14:03:53 +0200 Subject: [PATCH 1/2] Increase details in docs --- doc/zmq_ctx_set.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/doc/zmq_ctx_set.txt b/doc/zmq_ctx_set.txt index e47edce0..a9e298c9 100644 --- a/doc/zmq_ctx_set.txt +++ b/doc/zmq_ctx_set.txt @@ -64,9 +64,11 @@ ZMQ_THREAD_PRIORITY: Set scheduling priority for I/O threads ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_THREAD_PRIORITY' argument sets scheduling priority for internal context's thread pool. This option is not available on windows. -When the scheduler policy is SCHED_OTHER on Linux, the system call "nice" -will be used to set a priority of -20 (max priority). Supported values for this option depend on chosen scheduling policy. +On Linux, when the scheduler policy is SCHED_OTHER, SCHED_IDLE or SCHED_BATCH, the OS scheduler +will not use the thread priority but rather the thread "nice value"; in such cases +the system call "nice" will be used to set the nice value to -20 (max priority) instead of +adjusting the thread priority (which must be zero for those scheduling policies). Details can be found in sched.h file, or at http://man7.org/linux/man-pages/man2/sched_setscheduler.2.html. This option only applies before creating any sockets on the context. @@ -78,6 +80,10 @@ ZMQ_THREAD_AFFINITY: Set CPU affinity for I/O threads ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_THREAD_AFFINITY' argument sets CPU affinity for the internal context's thread pool. This option is only supported on Linux. +On Linux, each bit of the 'option_value' argument will represent an enabled +CPU in the corresponding cpu_set_t; for example the value 0x1 will set affinity +of all context's thread pool to CPU 0; the value 0x110 will set affinity +of all context's thread pool to CPU 1 and 2. This option only applies before creating any sockets on the context. [horizontal] From b95ef430be33cd3d1962e0ad5ee127933d048ff9 Mon Sep 17 00:00:00 2001 From: f18m Date: Tue, 17 Oct 2017 14:11:42 +0200 Subject: [PATCH 2/2] Add docs for ZMQ_THREAD_NAME_PREFIX --- doc/zmq_ctx_set.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/doc/zmq_ctx_set.txt b/doc/zmq_ctx_set.txt index a9e298c9..0af25b08 100644 --- a/doc/zmq_ctx_set.txt +++ b/doc/zmq_ctx_set.txt @@ -90,6 +90,21 @@ This option only applies before creating any sockets on the context. Default value:: -1 +ZMQ_THREAD_NAME_PREFIX: Set name prefix for I/O threads +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The 'ZMQ_THREAD_NAME_PREFIX' argument sets a numeric prefix to each thread +created for the internal context's thread pool. This option is only supported on Linux. +This option is useful to help debugging done via "top -H" or "gdb"; in case +multiple processes on the system are using ZeroMQ it is useful to provide through +this context option an application-specific prefix to distinguish ZeroMQ background +threads that belong to different processes. +This option only applies before creating any sockets on the context. + +[horizontal] +Default value:: -1 + + + ZMQ_MAX_MSGSZ: Set maximum message size ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_MAX_MSGSZ' argument sets the maximum allowed size