From b4ca229264fa7275958bd4ae2d01c677613ca83b Mon Sep 17 00:00:00 2001 From: shixuantong Date: Wed, 25 Sep 2024 17:11:12 +0800 Subject: [PATCH] remove threshold:max cpu cores --- remove-threshold-max-cpu-cores.patch | 44 ++++++++++++++++++++++++++++ sysSentry.spec | 9 +++++- 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 remove-threshold-max-cpu-cores.patch diff --git a/remove-threshold-max-cpu-cores.patch b/remove-threshold-max-cpu-cores.patch new file mode 100644 index 0000000..5919180 --- /dev/null +++ b/remove-threshold-max-cpu-cores.patch @@ -0,0 +1,44 @@ +From 1231fbe36ef453f343d5a3430ad3424e35b2c4b2 Mon Sep 17 00:00:00 2001 +From: jwolf <523083921@qq.com> +Date: Wed, 25 Sep 2024 16:09:17 +0800 +Subject: [PATCH] remove threshold:max cpu cores + +--- + src/c/catcli/catlib/plugin/cpu_patrol/cpu_patrol_result.c | 4 ++-- + src/c/catcli/catlib/plugin/cpu_patrol/cpu_patrol_result.h | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/c/catcli/catlib/plugin/cpu_patrol/cpu_patrol_result.c b/src/c/catcli/catlib/plugin/cpu_patrol/cpu_patrol_result.c +index f4f3172..8e31312 100644 +--- a/src/c/catcli/catlib/plugin/cpu_patrol/cpu_patrol_result.c ++++ b/src/c/catcli/catlib/plugin/cpu_patrol/cpu_patrol_result.c +@@ -22,8 +22,8 @@ static cat_return_t insert_core_to_list(core_list_st *core_list, int coreid) + CAT_LOG_W("Core %d is a special core and cannot be isolated", coreid); + return CAT_OK; + } +- if ((core_list->current_nums == MAX_ISOLATE_CORES_PER_PATROL) || (coreid < 0)) { +- CAT_LOG_W("Too many cores need to isolate,do not isolate core(%d)", coreid); ++ if (coreid < 0) { ++ CAT_LOG_W("Inner error, coreid is a negative number"); + return CAT_ERR; + } + +diff --git a/src/c/catcli/catlib/plugin/cpu_patrol/cpu_patrol_result.h b/src/c/catcli/catlib/plugin/cpu_patrol/cpu_patrol_result.h +index 92dcdc3..9722ec9 100644 +--- a/src/c/catcli/catlib/plugin/cpu_patrol/cpu_patrol_result.h ++++ b/src/c/catcli/catlib/plugin/cpu_patrol/cpu_patrol_result.h +@@ -30,9 +30,9 @@ typedef enum { + #define CAT_LOG_W(...) CAT_LOG("WARN", __VA_ARGS__) + #define CAT_LOG_E(...) CAT_LOG("ERROR", __VA_ARGS__) + +-#define MAX_ISOLATE_CORES_PER_PATROL 64 // 一次巡检最大支持隔离故障核数量,一次巡检同时检测到2个以上故障核的概率非常低 ++#define MAX_CPU_CORES 4096 + typedef struct { +- unsigned int order_list[MAX_ISOLATE_CORES_PER_PATROL]; ++ unsigned int order_list[MAX_CPU_CORES]; + unsigned short current_nums; + } core_list_st; + +-- +2.27.0 + diff --git a/sysSentry.spec b/sysSentry.spec index c1e22fd..1497a74 100644 --- a/sysSentry.spec +++ b/sysSentry.spec @@ -4,7 +4,7 @@ Summary: System Inspection Framework Name: sysSentry Version: 1.0.2 -Release: 14 +Release: 15 License: Mulan PSL v2 Group: System Environment/Daemons Source0: https://gitee.com/openeuler/sysSentry/releases/download/v%{version}/%{name}-%{version}.tar.gz @@ -25,6 +25,7 @@ Patch12: fix-syssentry-fails-to-be-started-when-cpu_sentry-is.patch Patch13: optimize-the-handing-of-cat-cli-error-msg-in-cpu_sentry.patch Patch14: over-threshold-should-be-warn-level-log-in-cat-cli.patch Patch15: add-separator-to-err-info.patch +Patch16: remove-threshold-max-cpu-cores.patch BuildRequires: cmake gcc-c++ BuildRequires: python3 python3-setuptools @@ -182,6 +183,12 @@ rm -rf %{buildroot} %attr(0550,root,root) %{python3_sitelib}/syssentry/cpu_* %changelog +* Wed Sep 25 2024 shixuantong - 1.0.2-15 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:remove threshold:max cpu cores + * Wed Sep 25 2024 shixuantong - 1.0.2-14 - Type:bugfix - CVE:NA -- Gitee