]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
rctl(4): support throttling resource usage to 0
authorJason A. Harmening <jah@FreeBSD.org>
Wed, 30 Dec 2020 23:29:44 +0000 (15:29 -0800)
committerJason A. Harmening <jah@FreeBSD.org>
Tue, 26 Jan 2021 03:57:44 +0000 (19:57 -0800)
commit70cdab054c8ffe7f5561ab8f31db33ee62d12c9c
treedbe9f17356c4aa84f45922c4e8ffb045d7133edb
parent7baf7a45385962d06cd2a2213109b910d40a7936
rctl(4): support throttling resource usage to 0

For rate-based resources that support throttling (e.g.
readiops/writeips), this fixes a divide-by-zero panic when rctl(8)
passes 0 as the throttle value.  For these resources, treat
zero-throttle requests as requests to suspend forward progress as long
as possible using the duration specified in
kern.racct.rctl.throttle_max.

PR: 251803
Reported by: chris@cretaforce.gr

(cherry picked from commit e8a5a1ad7154dc34e3a5234267e19faa86d5ff33)
sys/kern/kern_rctl.c