From: Willy Tarreau Date: Fri, 17 May 2024 13:53:40 +0000 (+0200) Subject: Revert: MEDIUM: evports: permit to report multiple events at once" X-Git-Tag: v3.0-dev12~20 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e362b076b1d0f11966d302bc76199a40efe7a6a0;p=thirdparty%2Fhaproxy.git Revert: MEDIUM: evports: permit to report multiple events at once" 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. --- diff --git a/src/ev_evports.c b/src/ev_evports.c index 0d6828769a..ee357bc1f4 100644 --- a/src/ev_evports.c +++ b/src/ev_evports.c @@ -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;