]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: mworker: disable busy polling in the master process
authorWilly Tarreau <w@1wt.eu>
Thu, 18 Apr 2019 09:31:36 +0000 (11:31 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 18 Apr 2019 09:34:41 +0000 (11:34 +0200)
When enabling busy polling, we don't want the master to use it, or it
wastes a dedicated processor to this!

Must be backported to 1.9.

src/haproxy.c

index 3477ca54e421d185f587f8fef83aad95d2698169..fb6481b78a32b1845a97ba8634513df03e3fdfb6 100644 (file)
@@ -650,6 +650,8 @@ static void mworker_loop()
        if (global.tune.options & GTUNE_USE_SYSTEMD)
                sd_notifyf(0, "READY=1\nMAINPID=%lu", (unsigned long)getpid());
 #endif
+       /* Busy polling makes no sense in the master :-) */
+       global.tune.options &= ~GTUNE_BUSY_POLLING;
 
        master = 1;