Author: kaktus
Date: Sat Feb 15 18:48:38 2020
New Revision: 357971
URL: https://svnweb.freebsd.org/changeset/base/357971

Log:
  Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (1 of many)
  
  r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are
  still not MPSAFE (or already are but aren’t properly marked). Use it in
  preparation for a general review of all nodes.
  This is non-functional change that adds annotations to SYSCTL_NODE and
  SYSCTL_PROC nodes using one of the soon-to-be-required flags.
  
  Reviewed by:  kib, trasz
  Approved by:  kib (mentor)
  Differential Revision:        https://reviews.freebsd.org/D23640

Modified:
  head/sys/dev/iscsi/icl.c
  head/sys/dev/iscsi/iscsi.c
  head/sys/fs/autofs/autofs.c
  head/sys/kern/kern_rctl.c

Modified: head/sys/dev/iscsi/icl.c
==============================================================================
--- head/sys/dev/iscsi/icl.c    Sat Feb 15 18:37:26 2020        (r357970)
+++ head/sys/dev/iscsi/icl.c    Sat Feb 15 18:48:38 2020        (r357971)
@@ -75,7 +75,8 @@ static int sysctl_kern_icl_offloads(SYSCTL_HANDLER_ARG
 static MALLOC_DEFINE(M_ICL, "icl", "iSCSI Common Layer");
 static struct icl_softc        *sc;
 
-SYSCTL_NODE(_kern, OID_AUTO, icl, CTLFLAG_RD, 0, "iSCSI Common Layer");
+SYSCTL_NODE(_kern, OID_AUTO, icl, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
+    "iSCSI Common Layer");
 int icl_debug = 1;
 SYSCTL_INT(_kern_icl, OID_AUTO, debug, CTLFLAG_RWTUN,
     &icl_debug, 0, "Enable debug messages");

Modified: head/sys/dev/iscsi/iscsi.c
==============================================================================
--- head/sys/dev/iscsi/iscsi.c  Sat Feb 15 18:37:26 2020        (r357970)
+++ head/sys/dev/iscsi/iscsi.c  Sat Feb 15 18:48:38 2020        (r357971)
@@ -82,7 +82,8 @@ FEATURE(iscsi_kernel_proxy, "iSCSI initiator built wit
  */
 static struct iscsi_softc      *sc;
 
-SYSCTL_NODE(_kern, OID_AUTO, iscsi, CTLFLAG_RD, 0, "iSCSI initiator");
+SYSCTL_NODE(_kern, OID_AUTO, iscsi, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
+    "iSCSI initiator");
 static int debug = 1;
 SYSCTL_INT(_kern_iscsi, OID_AUTO, debug, CTLFLAG_RWTUN,
     &debug, 0, "Enable debug messages");

Modified: head/sys/fs/autofs/autofs.c
==============================================================================
--- head/sys/fs/autofs/autofs.c Sat Feb 15 18:37:26 2020        (r357970)
+++ head/sys/fs/autofs/autofs.c Sat Feb 15 18:48:38 2020        (r357971)
@@ -119,7 +119,8 @@ int autofs_sig_set[] = {
 
 struct autofs_softc    *autofs_softc;
 
-SYSCTL_NODE(_vfs, OID_AUTO, autofs, CTLFLAG_RD, 0, "Automounter filesystem");
+SYSCTL_NODE(_vfs, OID_AUTO, autofs, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
+    "Automounter filesystem");
 int autofs_debug = 1;
 TUNABLE_INT("vfs.autofs.debug", &autofs_debug);
 SYSCTL_INT(_vfs_autofs, OID_AUTO, debug, CTLFLAG_RWTUN,

Modified: head/sys/kern/kern_rctl.c
==============================================================================
--- head/sys/kern/kern_rctl.c   Sat Feb 15 18:37:26 2020        (r357970)
+++ head/sys/kern/kern_rctl.c   Sat Feb 15 18:48:38 2020        (r357971)
@@ -96,7 +96,8 @@ static int rctl_throttle_max_sysctl(SYSCTL_HANDLER_ARG
 static int rctl_throttle_pct_sysctl(SYSCTL_HANDLER_ARGS);
 static int rctl_throttle_pct2_sysctl(SYSCTL_HANDLER_ARGS);
 
-SYSCTL_NODE(_kern_racct, OID_AUTO, rctl, CTLFLAG_RW, 0, "Resource Limits");
+SYSCTL_NODE(_kern_racct, OID_AUTO, rctl, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
+    "Resource Limits");
 SYSCTL_UINT(_kern_racct_rctl, OID_AUTO, maxbufsize, CTLFLAG_RWTUN,
     &rctl_maxbufsize, 0, "Maximum output buffer size");
 SYSCTL_UINT(_kern_racct_rctl, OID_AUTO, log_rate_limit, CTLFLAG_RW,
@@ -104,19 +105,23 @@ SYSCTL_UINT(_kern_racct_rctl, OID_AUTO, log_rate_limit
 SYSCTL_UINT(_kern_racct_rctl, OID_AUTO, devctl_rate_limit, CTLFLAG_RWTUN,
     &rctl_devctl_rate_limit, 0, "Maximum number of devctl messages per 
second");
 SYSCTL_PROC(_kern_racct_rctl, OID_AUTO, throttle_min,
-    CTLTYPE_UINT | CTLFLAG_RWTUN, 0, 0, &rctl_throttle_min_sysctl, "IU",
+    CTLTYPE_UINT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, 0, 0,
+    &rctl_throttle_min_sysctl, "IU",
     "Shortest throttling duration, in hz");
 TUNABLE_INT("kern.racct.rctl.throttle_min", &rctl_throttle_min);
 SYSCTL_PROC(_kern_racct_rctl, OID_AUTO, throttle_max,
-    CTLTYPE_UINT | CTLFLAG_RWTUN, 0, 0, &rctl_throttle_max_sysctl, "IU",
+    CTLTYPE_UINT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, 0, 0,
+    &rctl_throttle_max_sysctl, "IU",
     "Longest throttling duration, in hz");
 TUNABLE_INT("kern.racct.rctl.throttle_max", &rctl_throttle_max);
 SYSCTL_PROC(_kern_racct_rctl, OID_AUTO, throttle_pct,
-    CTLTYPE_UINT | CTLFLAG_RWTUN, 0, 0, &rctl_throttle_pct_sysctl, "IU",
+    CTLTYPE_UINT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, 0, 0,
+    &rctl_throttle_pct_sysctl, "IU",
     "Throttling penalty for process consumption, in percent");
 TUNABLE_INT("kern.racct.rctl.throttle_pct", &rctl_throttle_pct);
 SYSCTL_PROC(_kern_racct_rctl, OID_AUTO, throttle_pct2,
-    CTLTYPE_UINT | CTLFLAG_RWTUN, 0, 0, &rctl_throttle_pct2_sysctl, "IU",
+    CTLTYPE_UINT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, 0, 0,
+    &rctl_throttle_pct2_sysctl, "IU",
     "Throttling penalty for container consumption, in percent");
 TUNABLE_INT("kern.racct.rctl.throttle_pct2", &rctl_throttle_pct2);
 
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to