Hi,
在 2025/02/21 16:59, Ming Lei 写道:
And if the tg idle for a long time before dispatching the next IO,
tg_trim_slice() should handle this case and avoid long slice end. This
is not quite handy, perhaps it's better to add a helper like
tg_in_debt() before throtl_start_new_slice() to hande this case.
BTW, we must update the comment about carryover_bytes/ios, it's alredy
used as debt.
Indeed, the approach is similar with the handling for
bio_issue_as_root_blkg().
Tested-by: Ming Lei<ming.lei@xxxxxxxxxx>
While cooking the patch, I found a better way than tg_in_debt() before
throtl_start_new_slice(), by making sure the current slice has 1 more
jiffies to repay the debt. I'll send the patch soon, let me know if you
don't want me to kee the test tag.
Thanks,
Kuai