Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F174582042
D57613.id179970.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D57613.id179970.diff
View Options
diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c
--- a/sys/kern/subr_witness.c
+++ b/sys/kern/subr_witness.c
@@ -404,17 +404,22 @@
#endif /* DDB || KDB */
#ifdef WITNESS_SKIPSPIN
-int witness_skipspin = 1;
+static bool witness_skipspin = true;
#else
-int witness_skipspin = 0;
+static bool witness_skipspin = false;
#endif
-SYSCTL_INT(_debug_witness, OID_AUTO, skipspin, CTLFLAG_RDTUN, &witness_skipspin, 0, "");
+SYSCTL_BOOL(_debug_witness, OID_AUTO, skipspin,
+ CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &witness_skipspin, 0,
+ "Skip all witness checks on spin locks");
+TUNABLE_BOOL("debug.witness.skipspin", &witness_skipspin);
int badstack_sbuf_size;
-int witness_count = WITNESS_COUNT;
-SYSCTL_INT(_debug_witness, OID_AUTO, witness_count, CTLFLAG_RDTUN,
- &witness_count, 0, "");
+static u_long witness_count = WITNESS_COUNT;
+SYSCTL_ULONG(_debug_witness, OID_AUTO, witness_count,
+ CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &witness_count, 0,
+ "Maximum count of lock type entries");
+TUNABLE_ULONG("debug.witness.witness_count", &witness_count);
/*
* Output channel for witness messages. By default we print to the console.
@@ -790,7 +795,8 @@
/*
* The WITNESS-enabled diagnostic code. Note that the witness code does
* assume that the early boot is single-threaded at least until after this
- * routine is completed.
+ * routine is completed. This routine runs during SI_SUB_VM. Any read-only
+ * tunables need to have been initialized by now.
*/
void
witness_startup(void *mem)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Oct 5, 9:42 AM (2 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40234967
Default Alt Text
D57613.id179970.diff (1 KB)
Attached To
Mode
D57613: witness: actually set read-only tunables in time for witness_startup
Attached
Detach File
Event Timeline
Log In to Comment