about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-06-19 08:38:52 +0000
committerEric Wong <normalperson@yhbt.net>2013-06-19 08:38:52 +0000
commit5e529289f2b5c5a6a4fb917d447c42913c20e6f6 (patch)
tree5bd53d8ed547933aa91952b4195635aa8fd379a9
parent3ccb31387d610da6525c464015f7688e71901ea5 (diff)
downloadcmogstored-5e529289f2b5c5a6a4fb917d447c42913c20e6f6.tar.gz
Unfortunately, quasi-standard MIN/MAX macros are confusing to me :x
This fixes the code to match the comment describing the reasoning
for limiting threads.
-rw-r--r--svc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/svc.c b/svc.c
index 18e0144..24d90fd 100644
--- a/svc.c
+++ b/svc.c
@@ -210,7 +210,7 @@ bool mog_svc_start_each(void *svc_ptr, void *main_ptr)
          * Increasing threads here just leads to lock contention inside the
          * kernel (accept/accept4/EPOLL_CTL_ADD)
          */
-        athr = mog_main->worker_processes > 1 ? 1 : MAX(2, athr);
+        athr = mog_main->worker_processes > 1 ? 1 : MIN(2, athr);
 
         svc->queue = q;
         mog_thrpool_start(&q->thrpool, nthr, mog_queue_loop, q);