Bläddra i källkod

qcacmn: Disable panic for scheduler timeouts

When a scheduler message starts porcessing,we start
the scheduler watchdog timer, and in few cases when the
system get under heavy load processing tasklets
and bottom halves, and the scheduler message is preempted,
its not getting a chance to run and the scheduler watchdog
timer is triggered and it causes a panic.

Since the scheduler watchdog timmer is less than
the kernel RCU timer, were are having scenarios, where
because of the scheduler watchdog panic, the RCU stall is masked.

So in case of scheduler watchdog we wanted to just print
the information about the message being processed by the scheduler
and not panic.

Change-Id: I509abcd8cd8d2e863dc3f2370ceaa70e0d4f244f
CRs-Fixed: 3004176
Vivek 3 år sedan
förälder
incheckning
2f4b444fb7
2 ändrade filer med 10 tillägg och 4 borttagningar
  1. 7 1
      scheduler/inc/scheduler_core.h
  2. 3 3
      scheduler/src/scheduler_api.c

+ 7 - 1
scheduler/inc/scheduler_core.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2021 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -34,6 +34,12 @@
 #define SCHEDULER_WRAPPER_MAX_FAIL_COUNT (SCHEDULER_CORE_MAX_MESSAGES * 3)
 #define SCHEDULER_WATCHDOG_TIMEOUT (10 * 1000) /* 10s */
 
+#ifdef CONFIG_AP_PLATFORM
+#define SCHED_DEBUG_PANIC(msg)
+#else
+#define SCHED_DEBUG_PANIC(msg) QDF_DEBUG_PANIC(msg)
+#endif
+
 #define sched_fatal(params...) \
 	QDF_TRACE_FATAL(QDF_MODULE_ID_SCHEDULER, params)
 #define sched_err(params...) \

+ 3 - 3
scheduler/src/scheduler_api.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2021 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -63,7 +63,7 @@ static inline void scheduler_watchdog_notify(struct scheduler_ctx *sched)
 	sched_fatal("Callback %s (type 0x%x) exceeded its allotted time of %ds",
 		    sched->watchdog_callback ? symbol : "<null>",
 		    sched->watchdog_msg_type,
-		    SCHEDULER_WATCHDOG_TIMEOUT / 1000);
+		    sched->timeout / 1000);
 }
 
 static void scheduler_watchdog_timeout(void *arg)
@@ -83,7 +83,7 @@ static void scheduler_watchdog_timeout(void *arg)
 	if (qdf_atomic_test_bit(MC_SHUTDOWN_EVENT_MASK, &sched->sch_event_flag))
 		return;
 
-	QDF_DEBUG_PANIC("Going down for Scheduler Watchdog Bite!");
+	SCHED_DEBUG_PANIC("Going down for Scheduler Watchdog Bite!");
 }
 
 QDF_STATUS scheduler_enable(void)