mirror of
https://github.com/haproxy/haproxy.git
synced 2026-06-11 01:41:49 -04:00
[BUG] sched: don't leave 3 lasts tasks unprocessed when niced tasks are present
When there are niced tasks, we would only process #tasks/4 per turn, without taking care of running #tasks when #tasks was below 4, leaving those tasks waiting for a few other tasks to push them. The fix simply consists in checking (#tasks+3)/4.
This commit is contained in:
parent
e35c94a748
commit
218859ad6c
1 changed files with 1 additions and 1 deletions
|
|
@ -182,7 +182,7 @@ void process_runnable_tasks(int *next)
|
|||
max_processed = 200;
|
||||
|
||||
if (likely(niced_tasks))
|
||||
max_processed /= 4;
|
||||
max_processed = (max_processed + 3) / 4;
|
||||
|
||||
expire = *next;
|
||||
eb = eb32_lookup_ge(&rqueue, rqueue_ticks - TIMER_LOOK_BACK);
|
||||
|
|
|
|||
Loading…
Reference in a new issue