git: f5736727df5a - stable/13 - cam_iosched: use tunable flag and make a bool really a bool

Warner Losh imp at FreeBSD.org
Wed Jul 21 16:14:05 UTC 2021


The branch stable/13 has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=f5736727df5ae6a55ceb0c76cb8f4e0990eb7197

commit f5736727df5ae6a55ceb0c76cb8f4e0990eb7197
Author:     Warner Losh <imp at FreeBSD.org>
AuthorDate: 2021-07-13 06:00:33 +0000
Commit:     Warner Losh <imp at FreeBSD.org>
CommitDate: 2021-07-21 16:13:10 +0000

    cam_iosched: use tunable flag and make a bool really a bool
    
    kern.cam.do_dynamic_iosched is really a bool, so change its type to
    bool. While I'm here, also use the CTLFLAG_TUN flag instead of a
    separate tunable line for it and kern.cam.iosched_alpha_bits.
    
    MFC After:              1 week
    Sponsored by:           Netflix
    
    (cherry picked from commit a065ccb2804fae834a7c66e29b726ea3dbbceace)
---
 sys/cam/cam_iosched.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/sys/cam/cam_iosched.c b/sys/cam/cam_iosched.c
index ba1bc4843163..218b52687f42 100644
--- a/sys/cam/cam_iosched.c
+++ b/sys/cam/cam_iosched.c
@@ -70,9 +70,8 @@ static MALLOC_DEFINE(M_CAMSCHED, "CAM I/O Scheduler",
 
 #ifdef CAM_IOSCHED_DYNAMIC
 
-static int do_dynamic_iosched = 1;
-TUNABLE_INT("kern.cam.do_dynamic_iosched", &do_dynamic_iosched);
-SYSCTL_INT(_kern_cam, OID_AUTO, do_dynamic_iosched, CTLFLAG_RD,
+static bool do_dynamic_iosched = 1;
+SYSCTL_BOOL(_kern_cam, OID_AUTO, do_dynamic_iosched, CTLFLAG_RD | CTLFLAG_TUN,
     &do_dynamic_iosched, 1,
     "Enable Dynamic I/O scheduler optimizations.");
 
@@ -97,8 +96,7 @@ SYSCTL_INT(_kern_cam, OID_AUTO, do_dynamic_iosched, CTLFLAG_RD,
  * Note: See computation of EMA and EMVAR for acceptable ranges of alpha.
  */
 static int alpha_bits = 9;
-TUNABLE_INT("kern.cam.iosched_alpha_bits", &alpha_bits);
-SYSCTL_INT(_kern_cam, OID_AUTO, iosched_alpha_bits, CTLFLAG_RW,
+SYSCTL_INT(_kern_cam, OID_AUTO, iosched_alpha_bits, CTLFLAG_RW | CTLFLAG_TUN,
     &alpha_bits, 1,
     "Bits in EMA's alpha.");
 


More information about the dev-commits-src-all mailing list