]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
Revert: MEDIUM: evports: permit to report multiple events at once"
authorWilly Tarreau <w@1wt.eu>
Fri, 17 May 2024 13:53:40 +0000 (15:53 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 17 May 2024 13:57:18 +0000 (15:57 +0200)
Tests have shown that switching nevlist to global.tune.maxpollevents
is totally unreliable when using evports, and that events seem to be
missed. A good reproducer seems to be QUIC. There are not enough
users of Solaris to warrant spending more time trying to get down to
this, and even the few that remain are by definition not interested
in performance, so let's just revert the commit that tried to lift the
value: e6662bf706 ("MEDIUM: evports: permit to report multiple events
at once").

No backport is needed.

src/ev_evports.c

index 0d6828769a5f1919d8f22f53e2916b89f9b29c89..ee357bc1f4d2cc64b9230308d27510d334a402d7 100644 (file)
@@ -185,7 +185,15 @@ static void _do_poll(struct poller *p, int exp, int wake)
        do {
                int timeout = (global.tune.options & GTUNE_BUSY_POLLING) ? 0 : wait_time;
                int interrupted = 0;
-               nevlist = global.tune.maxpollevents; /* desired number of events to be retrieved */
+               /* Note: normally we should probably expect to pass
+                * global.tune.maxpollevents here so as to process multiple
+                * events at once, but it appears unreliable in tests, even
+                * starting with value 2, and it seems basically nobody's
+                * using that anymore so it's probably not worth spending days
+                * investigating this poller more to improve its performance,
+                * let's switch back to 1. --WT
+                */
+               nevlist = 1; /* desired number of events to be retrieved */
                timeout_ts.tv_sec  = (timeout / 1000);
                timeout_ts.tv_nsec = (timeout % 1000) * 1000000;