lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Thu, 24 Mar 2011 13:48:02 -0400
From:	Joe Korty <joe.korty@...r.com>
To:	paulmck@...ux.vnet.ibm.com
Cc:	fweisbec@...il.com, peterz@...radead.org, laijs@...fujitsu.com,
	mathieu.desnoyers@...icios.com, dhowells@...hat.com,
	loic.minier@...aro.org, dhaval.giani@...il.com, tglx@...utronix.de,
	josh@...htriplett.org, houston.jim@...cast.net,
	andi@...stfloor.org, linux-kernel@...r.kernel.org
Subject: [PATCH 13/24] jrcu: tuneable watchdog

jrcu: Make the watchdog value a tuneable.

Also increase the default to 30 seconds.

Signed-off-by: Joe Korty <joe.korty@...r.com>

Index: b/kernel/jrcu.c
===================================================================
--- a/kernel/jrcu.c
+++ b/kernel/jrcu.c
@@ -139,6 +139,8 @@ int rcu_scheduler_active __read_mostly;
 int rcu_nmi_seen __read_mostly;
 static u64 rcu_timestamp;
 
+int rcu_wdog = 30;		/* rcu watchdog interval, in seconds */
+
 /*
  * Return our CPU id or zero if we are too early in the boot process to
  * know what that is.  For RCU to work correctly, a cpu named '0' must
@@ -327,7 +329,7 @@ static void __rcu_delimit_batches(struct
 	 */
 	rcu_now = sched_clock();
 	if (!eob && !rcu_timestamp
-	&& ((rcu_now - rcu_timestamp) > 3LL * NSEC_PER_SEC)) {
+	&& ((rcu_now - rcu_timestamp) > (s64)rcu_wdog * NSEC_PER_SEC)) {
 		rcu_stats.nforced++;
 		WARN_ON_ONCE(1);
 		eob = 1;
@@ -576,6 +578,7 @@ static int rcu_debugfs_show(struct seq_f
 	raw_local_irq_enable();
 
 	seq_printf(m, "%14u: hz\n", rcu_hz);
+	seq_printf(m, "%14u: watchdog (secs)\n", rcu_wdog);
 #ifdef CONFIG_JRCU_DAEMON
 	if (rcu_daemon)
 		seq_printf(m, "%14u: daemon priority\n", rcu_priority);
@@ -671,6 +674,12 @@ static ssize_t rcu_debugfs_write(struct 
 			return -EINVAL;
 		rcu_hz = rcu_hz_wanted;
 		rcu_hz_period_us = USEC_PER_SEC / rcu_hz;
+	} else if (!strncmp(token, "wdog=", 5)) {
+		int wdog = -1;
+		sscanf(&token[5], "%d", &wdog);
+		if (wdog < 3 || wdog > 1000)
+			return -EINVAL;
+		rcu_wdog = wdog;
 	} else
 		return -EINVAL;
 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ