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]
Message-ID: <20110324174804.GA18972@tsunami.ccur.com>
Date:	Thu, 24 Mar 2011 13:48:04 -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 24/24] jrcu: show #passes affected by NMI

jrcu: show #passes affected by NMIs.

If one has a system that generates lots of NMIs, they
may disturb jrcu significantly.  It is good to see that
happening in the rcudata file stats.

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

Index: b/kernel/jrcu.c
===================================================================
--- a/kernel/jrcu.c
+++ b/kernel/jrcu.c
@@ -122,6 +122,7 @@ static struct rcu_stats {
 	unsigned npasses;	/* #passes made */
 	unsigned nlast;		/* #passes since last end-of-batch */
 	unsigned nbatches;	/* #end-of-batches (eobs) seen */
+	unsigned nmis;		/* #passes discarded due to NMI */
 	atomic_t nbarriers;	/* #rcu barriers processed */
 	atomic_t nsyncs;	/* #rcu syncs processed */
 	u64 ninvoked;		/* #invoked (ie, finished) callbacks */
@@ -302,17 +303,20 @@ static void __rcu_delimit_batches(struct
 	struct rcu_list *plist;
 	int cpu, eob, prev;
 
+	if (!rcu_scheduler_active)
+		return;
+
+	rcu_stats.nlast++;
+
 	/* If an NMI occured then the previous batch may not yet be
 	 * quiescent.  Let's wait till it is.
 	 */
 	if (rcu_nmi_seen) {
 		rcu_nmi_seen = 0;
+		rcu_stats.nmis++;
 		return;
 	}
 
-	if (!rcu_scheduler_active)
-		return;
-
 	/*
 	 * Find out if the current batch has ended
 	 * (end-of-batch).
@@ -329,8 +333,6 @@ static void __rcu_delimit_batches(struct
 		}
 	}
 
-	rcu_stats.nlast++;
-
 	/*
 	 * Exit if batch has not ended.  But first, tickle all non-cooperating
 	 * CPUs if enough time has passed.
@@ -345,7 +347,7 @@ static void __rcu_delimit_batches(struct
 			}
 		}
 		rcu_wdog_ctr += rcu_hz_period_us;
-		return eob;
+		return;
 	}
 
 	/*
@@ -603,10 +605,12 @@ static int rcu_debugfs_show(struct seq_f
 	seq_printf(m, "\n");
 	seq_printf(m, "%14u: #passes\n",
 		rcu_stats.npasses);
+	seq_printf(m, "%14u: #passes discarded due to NMI\n",
+		rcu_stats.nmis);
 	seq_printf(m, "%14u: #passes resulting in end-of-batch\n",
 		rcu_stats.nbatches);
 	seq_printf(m, "%14u: #passes not resulting in end-of-batch\n",
-		rcu_stats.npasses - rcu_stats.nbatches);
+		rcu_stats.npasses - rcu_stats.nbatches - rcu_stats.nmis);
 	seq_printf(m, "%14u: #passes since last end-of-batch\n",
 		rcu_stats.nlast);
 	seq_printf(m, "%14u: #passes forced (0 is best)\n",
--
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