From 5e529289f2b5c5a6a4fb917d447c42913c20e6f6 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 19 Jun 2013 08:38:52 +0000 Subject: svc: correctly limit listen sockets to 2 threads 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. --- svc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.2.3-24-ge0c7