Blame SOURCES/0003-Fix-for-HZ-calculation-on-Linux-5.14-and-later.patch

8c35ac
From b9dc76e232e0226a14ae3089e3be5c915f2bb981 Mon Sep 17 00:00:00 2001
8c35ac
From: Lianbo Jiang <lijiang@redhat.com>
8c35ac
Date: Mon, 10 Jan 2022 17:25:06 +0800
8c35ac
Subject: [PATCH 03/10] Fix for HZ calculation on Linux 5.14 and later
8c35ac
8c35ac
Kernel commit 3e9a99eba058 ("block/mq-deadline: Rename dd_init_queue()
8c35ac
and dd_exit_queue()") renamed dd_init_queue to dd_init_sched. Without
8c35ac
the patch, the 'help -m' may print incorrect hz value as follows:
8c35ac
8c35ac
crash> help -m | grep hz
8c35ac
       hz: 1000    <---The correct hz value on ppc64le machine is 100.
8c35ac
	   ^^^^
8c35ac
8c35ac
Fixes: b93027ce5c75 ("Add alternate HZ calculation using write_expire")
8c35ac
Signed-off-by: Lianbo Jiang <lijiang@redhat.com>
8c35ac
---
8c35ac
 task.c | 2 ++
8c35ac
 1 file changed, 2 insertions(+)
8c35ac
8c35ac
diff --git a/task.c b/task.c
8c35ac
index b5ddc88e0acb..76e184ae70b1 100644
8c35ac
--- a/task.c
8c35ac
+++ b/task.c
8c35ac
@@ -440,6 +440,8 @@ task_init(void)
8c35ac
 		}
8c35ac
 	} else if ((symbol_exists("dd_init_queue") &&
8c35ac
 	    gdb_set_crash_scope(symbol_value("dd_init_queue"), "dd_init_queue")) ||
8c35ac
+	    (symbol_exists("dd_init_sched") &&
8c35ac
+	    gdb_set_crash_scope(symbol_value("dd_init_sched"), "dd_init_sched")) ||
8c35ac
 	    (symbol_exists("deadline_init_queue") &&
8c35ac
 	    gdb_set_crash_scope(symbol_value("deadline_init_queue"), "deadline_init_queue"))) {
8c35ac
 		char buf[BUFSIZE];
8c35ac
-- 
8c35ac
2.20.1
8c35ac