[Skiboot] [PATCH] Limit number of "Poller recursion detected" errors to display

Stewart Smith stewart at linux.vnet.ibm.com
Wed Nov 16 16:04:59 AEDT 2016


In some error conditions, we could spiral out of control on this
and spend all of our time printing the exact same backtrace.

Limit it to 16 times, because 16 is a nice number.

Cc: stable
Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>
---
 core/opal.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/core/opal.c b/core/opal.c
index 61a2adb10602..269ab80df958 100644
--- a/core/opal.c
+++ b/core/opal.c
@@ -313,9 +313,10 @@ void opal_run_pollers(void)
 {
 	struct opal_poll_entry *poll_ent;
 	static int pollers_with_lock_warnings = 0;
+	static int poller_recursion = 0;
 
 	/* Don't re-enter on this CPU */
-	if (this_cpu()->in_poller) {
+	if (this_cpu()->in_poller && poller_recursion < 16) {
 		/**
 		 * @fwts-label OPALPollerRecursion
 		 * @fwts-advice Recursion detected in opal_run_pollers(). This
@@ -324,6 +325,9 @@ void opal_run_pollers(void)
 		 */
 		prlog(PR_ERR, "OPAL: Poller recursion detected.\n");
 		backtrace();
+		poller_recursion++;
+		if (poller_recursion == 16)
+			prlog(PR_ERR, "OPAL: Squashing future poller recursion warnings (>16).\n");
 		return;
 	}
 	this_cpu()->in_poller = true;
-- 
2.1.4



More information about the Skiboot mailing list