MEDIUM: evports: permit to report multiple events at once
Since the beginning in 2.0 the nevlist parameter was set to 1 before calling port_getn(), which means that a single FD event will be reported per polling loop. This is extremely inefficient, and all the code was designed to use global.tune.maxpollevents. It looks like it's a leftover of a temporary debugging change. No apparent issues were found by setting it to a higher value, so better do that. That code is not much used nowadays with Solaris disappearing from the landscape, so even if this definitely was a bug, it's preferable not to backport that fix as it could uncover other subtle bugs that were never raised yet.
This commit is contained in:
parent
36d92dcd9b
commit
e6662bf706
|
@ -185,7 +185,7 @@ 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 = 1; /* desired number of events to be retrieved */
|
||||
nevlist = global.tune.maxpollevents; /* desired number of events to be retrieved */
|
||||
timeout_ts.tv_sec = (timeout / 1000);
|
||||
timeout_ts.tv_nsec = (timeout % 1000) * 1000000;
|
||||
|
||||
|
|
Loading…
Reference in New Issue