|
|
c29fdf |
From 3166a87749fa4817d90ed335f3c5843fc38e7304 Mon Sep 17 00:00:00 2001
|
|
|
c29fdf |
From: Jan Friesse <jfriesse@redhat.com>
|
|
|
c29fdf |
Date: Mon, 24 Feb 2020 14:58:45 +0100
|
|
|
c29fdf |
Subject: [PATCH] main: Add schedmiss timestamp into message
|
|
|
c29fdf |
|
|
|
c29fdf |
This is useful for matching schedmiss event in stats map with logged
|
|
|
c29fdf |
event.
|
|
|
c29fdf |
|
|
|
c29fdf |
(backported from master 35662dd0ec53f456445c30c0ef92892f47b25aa2)
|
|
|
c29fdf |
|
|
|
c29fdf |
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
|
|
|
c29fdf |
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
|
|
|
c29fdf |
---
|
|
|
c29fdf |
exec/main.c | 6 +++++-
|
|
|
c29fdf |
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
|
c29fdf |
|
|
|
c29fdf |
diff --git a/exec/main.c b/exec/main.c
|
|
|
c29fdf |
index 204abc8..545c123 100644
|
|
|
c29fdf |
--- a/exec/main.c
|
|
|
c29fdf |
+++ b/exec/main.c
|
|
|
c29fdf |
@@ -834,6 +834,7 @@ static void timer_function_scheduler_timeout (void *data)
|
|
|
c29fdf |
struct scheduler_pause_timeout_data *timeout_data = (struct scheduler_pause_timeout_data *)data;
|
|
|
c29fdf |
unsigned long long tv_current;
|
|
|
c29fdf |
unsigned long long tv_diff;
|
|
|
c29fdf |
+ uint64_t schedmiss_event_tstamp;
|
|
|
c29fdf |
|
|
|
c29fdf |
tv_current = qb_util_nano_current_get ();
|
|
|
c29fdf |
|
|
|
c29fdf |
@@ -849,8 +850,11 @@ static void timer_function_scheduler_timeout (void *data)
|
|
|
c29fdf |
timeout_data->tv_prev = tv_current;
|
|
|
c29fdf |
|
|
|
c29fdf |
if (tv_diff > timeout_data->max_tv_diff) {
|
|
|
c29fdf |
- log_printf (LOGSYS_LEVEL_WARNING, "Corosync main process was not scheduled for %0.4f ms "
|
|
|
c29fdf |
+ schedmiss_event_tstamp = qb_util_nano_from_epoch_get() / QB_TIME_NS_IN_MSEC;
|
|
|
c29fdf |
+
|
|
|
c29fdf |
+ log_printf (LOGSYS_LEVEL_WARNING, "Corosync main process was not scheduled (@%" PRIu64 ") for %0.4f ms "
|
|
|
c29fdf |
"(threshold is %0.4f ms). Consider token timeout increase.",
|
|
|
c29fdf |
+ schedmiss_event_tstamp,
|
|
|
c29fdf |
(float)tv_diff / QB_TIME_NS_IN_MSEC, (float)timeout_data->max_tv_diff / QB_TIME_NS_IN_MSEC);
|
|
|
c29fdf |
|
|
|
c29fdf |
icmap_set_float("runtime.schedmiss.delay", (float)tv_diff / QB_TIME_NS_IN_MSEC);
|
|
|
c29fdf |
--
|
|
|
c29fdf |
1.8.3.1
|
|
|
c29fdf |
|