You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
autofair_queue::grab_pending_capacity(const fair_queue_entry& ent) noexcept -> grab_result {
_group.maybe_replenish_capacity(_group_replenish);
if (_group.capacity_deficiency(_pending->head)) {
return grab_result::pending;
}
capacity_t cap = ent._capacity;
if (cap > _pending->cap) {
return grab_result::cant_preempt;
}
_pending.reset();
return grab_result::grabbed;
}
is buggy. When a request with cap less than _pending->cap is dispatched (i.e. -- what a thin request preempts a fat one) the capacity that was grabbed by fat request (and due to which the queue was set to pending state) is partially lost. More precisely -- the dispatching request gets cap tokens, and the remainder _pending->cap - cap is lost.
This was indirectly introduced by 557017f (#1766). Prior to it, the unused capacity was returned into the replenish bucket.
This place in fair_queue
is buggy. When a request with cap less than _pending->cap is dispatched (i.e. -- what a thin request preempts a fat one) the capacity that was grabbed by fat request (and due to which the queue was set to pending state) is partially lost. More precisely -- the dispatching request gets
cap
tokens, and the remainder_pending->cap - cap
is lost.This was indirectly introduced by 557017f (#1766). Prior to it, the unused capacity was returned into the replenish bucket.
Possible fix can be
It shows some good results with io_tester. Job:
IOPS before the patch:
IOPS after the patch:
The text was updated successfully, but these errors were encountered: