From 22ea533179f6d82e2b0f85bf14cac2f6e6c23a97 Mon Sep 17 00:00:00 2001 From: Sergei Trifonov Date: Mon, 12 Sep 2022 14:56:01 +0200 Subject: [PATCH 1/2] Do not warn about kvm-clock --- programs/server/Server.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/programs/server/Server.cpp b/programs/server/Server.cpp index d788270ecf9..4e1002c40e0 100644 --- a/programs/server/Server.cpp +++ b/programs/server/Server.cpp @@ -550,7 +550,8 @@ static void sanityChecks(Server & server) try { const char * filename = "/sys/devices/system/clocksource/clocksource0/current_clocksource"; - if (readString(filename).find("tsc") == std::string::npos) + String clocksource = readString(filename); + if (clocksource.find("tsc") == std::string::npos && clocksource.find("kvm-clock") == std::string::npos) server.context()->addWarningMessage("Linux is not using a fast TSC clock source. Performance can be degraded. Check " + String(filename)); } catch (...) From 795c1c14383667f40efa73c8bcf6ad726022a325 Mon Sep 17 00:00:00 2001 From: Sergei Trifonov Date: Tue, 13 Sep 2022 12:44:42 +0200 Subject: [PATCH 2/2] fix warning text --- programs/server/Server.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/server/Server.cpp b/programs/server/Server.cpp index fac3c6d4563..168a9a0489a 100644 --- a/programs/server/Server.cpp +++ b/programs/server/Server.cpp @@ -553,7 +553,7 @@ static void sanityChecks(Server & server) const char * filename = "/sys/devices/system/clocksource/clocksource0/current_clocksource"; String clocksource = readString(filename); if (clocksource.find("tsc") == std::string::npos && clocksource.find("kvm-clock") == std::string::npos) - server.context()->addWarningMessage("Linux is not using a fast TSC clock source. Performance can be degraded. Check " + String(filename)); + server.context()->addWarningMessage("Linux is not using a fast clock source. Performance can be degraded. Check " + String(filename)); } catch (...) {