mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 22:01:31 +02:00
MINOR: task: give the scheduler a bit more flexibility in the runqueue size
Instead of setting a hard-limit on runqueue-depth and keeping it short to maintain fairness, let's allow the scheduler to automatically cut the existing one in two equal halves if its size is between the configured size and its double. This will allow to increase the default value while keeping a low latency.
This commit is contained in:
parent
befef70e23
commit
1691ba3693
@ -648,6 +648,13 @@ void process_runnable_tasks()
|
|||||||
if (likely(niced_tasks))
|
if (likely(niced_tasks))
|
||||||
max_processed = (max_processed + 3) / 4;
|
max_processed = (max_processed + 3) / 4;
|
||||||
|
|
||||||
|
if (max_processed < sched->rq_total && sched->rq_total <= 2*max_processed) {
|
||||||
|
/* If the run queue exceeds the budget by up to 50%, let's cut it
|
||||||
|
* into two identical halves to improve latency.
|
||||||
|
*/
|
||||||
|
max_processed = sched->rq_total / 2;
|
||||||
|
}
|
||||||
|
|
||||||
not_done_yet:
|
not_done_yet:
|
||||||
max[TL_URGENT] = max[TL_NORMAL] = max[TL_BULK] = 0;
|
max[TL_URGENT] = max[TL_NORMAL] = max[TL_BULK] = 0;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user