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

