diff --git a/components/control_plane/src/multimodal/control_plane_multimodal_runtime.c b/components/control_plane/src/multimodal/control_plane_multimodal_runtime.c index 1fc38a3..0562579 100644 --- a/components/control_plane/src/multimodal/control_plane_multimodal_runtime.c +++ b/components/control_plane/src/multimodal/control_plane_multimodal_runtime.c @@ -47,6 +47,16 @@ #define CONTROL_PLANE_IDLE_TRANSPORT_SHUTDOWN_MS 30000 #define CONTROL_PLANE_WATCHDOG_TASK_STACK_SIZE 6144 +#ifndef CONFIG_TQ_NETWORK_TASK_CORE +#define CONFIG_TQ_NETWORK_TASK_CORE 0 +#endif + +#if CONFIG_TQ_NETWORK_TASK_CORE < 0 +#define CONTROL_PLANE_MULTIMODAL_NETWORK_TASK_CORE tskNO_AFFINITY +#else +#define CONTROL_PLANE_MULTIMODAL_NETWORK_TASK_CORE ((BaseType_t)CONFIG_TQ_NETWORK_TASK_CORE) +#endif + static const char *TAG = "control_plane_mm_rt"; static TaskHandle_t s_multimodal_watchdog_task; static TaskHandle_t s_multimodal_autostart_task; @@ -434,12 +444,13 @@ static void schedule_autostart_if_enabled(void) } set_multimodal_stop_flag(&s_multimodal_autostart_stop_requested, false); - if (xTaskCreate(multimodal_autostart_task, - "mm_autostart", - 6144, - NULL, - 4, - &s_multimodal_autostart_task) != pdPASS) { + if (xTaskCreatePinnedToCore(multimodal_autostart_task, + "mm_autostart", + 6144, + NULL, + 4, + &s_multimodal_autostart_task, + CONTROL_PLANE_MULTIMODAL_NETWORK_TASK_CORE) != pdPASS) { set_multimodal_task_handle(&s_multimodal_autostart_task, NULL); set_multimodal_start_flag(&s_multimodal_autostart_task_starting, false); ESP_LOGW(TAG, "Auto Start task create failed"); @@ -646,12 +657,13 @@ esp_err_t control_plane_start_multimodal_client(void) try_begin_multimodal_task_start(&s_multimodal_watchdog_task, &s_multimodal_watchdog_task_starting)) { set_multimodal_stop_flag(&s_multimodal_watchdog_stop_requested, false); - if (xTaskCreate(multimodal_watchdog_task, - "mm_watchdog", - CONTROL_PLANE_WATCHDOG_TASK_STACK_SIZE, - NULL, - 4, - &s_multimodal_watchdog_task) != pdPASS) { + if (xTaskCreatePinnedToCore(multimodal_watchdog_task, + "mm_watchdog", + CONTROL_PLANE_WATCHDOG_TASK_STACK_SIZE, + NULL, + 4, + &s_multimodal_watchdog_task, + CONTROL_PLANE_MULTIMODAL_NETWORK_TASK_CORE) != pdPASS) { ESP_LOGE(TAG, "Watchdog task create failed"); set_multimodal_task_handle(&s_multimodal_watchdog_task, NULL); set_multimodal_start_flag(&s_multimodal_watchdog_task_starting, false); diff --git a/components/control_plane/src/multimodal/control_plane_multimodal_session_service.c b/components/control_plane/src/multimodal/control_plane_multimodal_session_service.c index ab564ad..84c1651 100644 --- a/components/control_plane/src/multimodal/control_plane_multimodal_session_service.c +++ b/components/control_plane/src/multimodal/control_plane_multimodal_session_service.c @@ -84,6 +84,16 @@ #define CONTROL_PLANE_LOCAL_RESPONDING_EVENT_QUEUE_LEN 4U #define CONTROL_PLANE_MULTIMODAL_BINARY_SUMMARY_INTERVAL 200U +#ifndef CONFIG_TQ_LOCAL_TASK_CORE +#define CONFIG_TQ_LOCAL_TASK_CORE 1 +#endif + +#if CONFIG_TQ_LOCAL_TASK_CORE < 0 +#define CONTROL_PLANE_LOCAL_RESPONDING_TASK_CORE tskNO_AFFINITY +#else +#define CONTROL_PLANE_LOCAL_RESPONDING_TASK_CORE ((BaseType_t)CONFIG_TQ_LOCAL_TASK_CORE) +#endif + #if ( configSUPPORT_STATIC_ALLOCATION == 1 ) && \ ((defined(CONFIG_FREERTOS_TASK_CREATE_ALLOW_EXT_MEM) && CONFIG_FREERTOS_TASK_CREATE_ALLOW_EXT_MEM) || \ defined(CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY)) @@ -210,7 +220,7 @@ static BaseType_t create_local_responding_event_task(TaskHandle_t *out_handle) NULL, CONTROL_PLANE_LOCAL_RESPONDING_EVENT_TASK_PRIORITY, out_handle, - tskNO_AFFINITY, + CONTROL_PLANE_LOCAL_RESPONDING_TASK_CORE, MALLOC_CAP_SPIRAM | MALLOC_CAP_8BIT); if (created == pdPASS) { return pdPASS; @@ -223,15 +233,16 @@ static BaseType_t create_local_responding_event_task(TaskHandle_t *out_handle) NULL, CONTROL_PLANE_LOCAL_RESPONDING_EVENT_TASK_PRIORITY, out_handle, - tskNO_AFFINITY, + CONTROL_PLANE_LOCAL_RESPONDING_TASK_CORE, MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT); #else - return xTaskCreate(local_responding_event_worker, - "mm_local_evt", - CONTROL_PLANE_LOCAL_RESPONDING_EVENT_TASK_STACK_BYTES, - NULL, - CONTROL_PLANE_LOCAL_RESPONDING_EVENT_TASK_PRIORITY, - out_handle); + return xTaskCreatePinnedToCore(local_responding_event_worker, + "mm_local_evt", + CONTROL_PLANE_LOCAL_RESPONDING_EVENT_TASK_STACK_BYTES, + NULL, + CONTROL_PLANE_LOCAL_RESPONDING_EVENT_TASK_PRIORITY, + out_handle, + CONTROL_PLANE_LOCAL_RESPONDING_TASK_CORE); #endif } diff --git a/components/control_plane/src/runtime/control_plane_factory_cli.c b/components/control_plane/src/runtime/control_plane_factory_cli.c index 5ebe1e5..35d65ea 100644 --- a/components/control_plane/src/runtime/control_plane_factory_cli.c +++ b/components/control_plane/src/runtime/control_plane_factory_cli.c @@ -37,6 +37,16 @@ #define FACTORY_CLI_START_WAIT_STEP_MS 20 #define FACTORY_CLI_START_GATE_WAIT_MS 5000 +#ifndef CONFIG_TQ_LOCAL_TASK_CORE +#define CONFIG_TQ_LOCAL_TASK_CORE 1 +#endif + +#if CONFIG_TQ_LOCAL_TASK_CORE < 0 +#define FACTORY_CLI_TASK_CORE tskNO_AFFINITY +#else +#define FACTORY_CLI_TASK_CORE ((BaseType_t)CONFIG_TQ_LOCAL_TASK_CORE) +#endif + static const char *TAG = "cp_factory_cli"; static TaskHandle_t s_worker_task; @@ -496,12 +506,13 @@ esp_err_t control_plane_factory_cli_start(void) } TaskHandle_t worker_task = NULL; - BaseType_t ok = xTaskCreate(factory_cli_worker_entry, - "factory_cli", - FACTORY_CLI_WORKER_STACK_BYTES, - NULL, - FACTORY_CLI_WORKER_PRIORITY, - &worker_task); + BaseType_t ok = xTaskCreatePinnedToCore(factory_cli_worker_entry, + "factory_cli", + FACTORY_CLI_WORKER_STACK_BYTES, + NULL, + FACTORY_CLI_WORKER_PRIORITY, + &worker_task, + FACTORY_CLI_TASK_CORE); if (ok != pdPASS) { factory_cli_finish_start(NULL); ESP_LOGE(TAG, "Failed to start factory CLI worker"); diff --git a/components/control_plane/src/runtime/control_plane_key_input.c b/components/control_plane/src/runtime/control_plane_key_input.c index 50668cc..cf15e04 100644 --- a/components/control_plane/src/runtime/control_plane_key_input.c +++ b/components/control_plane/src/runtime/control_plane_key_input.c @@ -48,6 +48,16 @@ #define CONFIG_TQ_KEY_INPUT_POLL_MS 20 #endif +#ifndef CONFIG_TQ_LOCAL_TASK_CORE +#define CONFIG_TQ_LOCAL_TASK_CORE 1 +#endif + +#if CONFIG_TQ_LOCAL_TASK_CORE < 0 +#define CONTROL_PLANE_KEY_INPUT_TASK_CORE tskNO_AFFINITY +#else +#define CONTROL_PLANE_KEY_INPUT_TASK_CORE ((BaseType_t)CONFIG_TQ_LOCAL_TASK_CORE) +#endif + #ifndef CONFIG_MULTIMODAL_PTT_BUTTON_PULLDOWN #define CONFIG_MULTIMODAL_PTT_BUTTON_PULLDOWN 0 #endif @@ -464,12 +474,13 @@ esp_err_t control_plane_start_key_input_task(void) } s_stop_requested = false; - BaseType_t created = xTaskCreate(control_plane_key_input_task, - "cp_key_input", - CONFIG_TQ_KEY_INPUT_TASK_STACK, - NULL, - 5, - &s_key_input_task); + BaseType_t created = xTaskCreatePinnedToCore(control_plane_key_input_task, + "cp_key_input", + CONFIG_TQ_KEY_INPUT_TASK_STACK, + NULL, + 5, + &s_key_input_task, + CONTROL_PLANE_KEY_INPUT_TASK_CORE); if (created != pdPASS) { s_key_input_task = NULL; return ESP_ERR_NO_MEM; diff --git a/components/control_plane/src/runtime/control_plane_runtime_workers.c b/components/control_plane/src/runtime/control_plane_runtime_workers.c index 97f588d..7a2018e 100644 --- a/components/control_plane/src/runtime/control_plane_runtime_workers.c +++ b/components/control_plane/src/runtime/control_plane_runtime_workers.c @@ -74,6 +74,26 @@ #define CONFIG_TQ_TASK_MONITOR_MAX_TASKS 64 #endif +#ifndef CONFIG_TQ_NETWORK_TASK_CORE +#define CONFIG_TQ_NETWORK_TASK_CORE 0 +#endif + +#ifndef CONFIG_TQ_LOCAL_TASK_CORE +#define CONFIG_TQ_LOCAL_TASK_CORE 1 +#endif + +#if CONFIG_TQ_NETWORK_TASK_CORE < 0 +#define CONTROL_PLANE_NETWORK_TASK_CORE tskNO_AFFINITY +#else +#define CONTROL_PLANE_NETWORK_TASK_CORE ((BaseType_t)CONFIG_TQ_NETWORK_TASK_CORE) +#endif + +#if CONFIG_TQ_LOCAL_TASK_CORE < 0 +#define CONTROL_PLANE_LOCAL_TASK_CORE tskNO_AFFINITY +#else +#define CONTROL_PLANE_LOCAL_TASK_CORE ((BaseType_t)CONFIG_TQ_LOCAL_TASK_CORE) +#endif + #ifndef CONFIG_FORTUNE_SNTP_SERVER #define CONFIG_FORTUNE_SNTP_SERVER "ntp.aliyun.com" #endif @@ -358,6 +378,7 @@ static esp_err_t control_plane_create_task(TaskFunction_t task, const char *name, uint32_t stack_size, UBaseType_t priority, + BaseType_t core_id, TaskHandle_t *out_handle) { if (task == NULL || out_handle == NULL) { @@ -372,7 +393,13 @@ static esp_err_t control_plane_create_task(TaskFunction_t task, ctx->task_with_caps = false; TaskHandle_t task_handle = NULL; - if (xTaskCreate(control_plane_task_start_gate, name, stack_size, ctx, priority, &task_handle) != pdPASS) { + if (xTaskCreatePinnedToCore(control_plane_task_start_gate, + name, + stack_size, + ctx, + priority, + &task_handle, + core_id) != pdPASS) { free(ctx); ESP_LOGE(TAG, "Task create failed: %s", name); return ESP_ERR_NO_MEM; @@ -387,6 +414,7 @@ static esp_err_t control_plane_create_task_psram_first(TaskFunction_t task, const char *name, uint32_t stack_size, UBaseType_t priority, + BaseType_t core_id, TaskHandle_t *out_handle) { if (task == NULL || out_handle == NULL) { @@ -408,7 +436,7 @@ static esp_err_t control_plane_create_task_psram_first(TaskFunction_t task, ctx, priority, &task_handle, - tskNO_AFFINITY, + core_id, MALLOC_CAP_SPIRAM | MALLOC_CAP_8BIT); if (created != pdPASS) { ESP_LOGW(TAG, "Task create with PSRAM stack failed: %s, fallback to internal stack", name); @@ -418,17 +446,18 @@ static esp_err_t control_plane_create_task_psram_first(TaskFunction_t task, ctx, priority, &task_handle, - tskNO_AFFINITY, + core_id, MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT); } #else ctx->task_with_caps = false; - BaseType_t created = xTaskCreate(control_plane_task_start_gate, - name, - stack_size, - ctx, - priority, - &task_handle); + BaseType_t created = xTaskCreatePinnedToCore(control_plane_task_start_gate, + name, + stack_size, + ctx, + priority, + &task_handle, + core_id); #endif if (created != pdPASS) { free(ctx); @@ -718,6 +747,7 @@ static esp_err_t control_plane_schedule_websocket_wait_task(void) "cp_ws_wait", CONTROL_PLANE_WS_WAIT_TASK_STACK_SIZE, 4, + CONTROL_PLANE_NETWORK_TASK_CORE, &s_ws_wait_task); portENTER_CRITICAL(&s_runtime_lock); s_ws_wait_task_starting = false; @@ -1453,6 +1483,7 @@ esp_err_t control_plane_start_runtime_workers(void) "cp_model_cmd", CONTROL_PLANE_MODEL_CMD_TASK_STACK_SIZE, 5, + CONTROL_PLANE_LOCAL_TASK_CORE, &s_model_cmd_task); if (task_err != ESP_OK) { control_plane_stop_runtime_workers(); @@ -1473,6 +1504,7 @@ esp_err_t control_plane_start_runtime_workers(void) "cp_direction", CONTROL_PLANE_DIRECTION_TASK_STACK_SIZE, 5, + CONTROL_PLANE_LOCAL_TASK_CORE, &s_direction_console_task); if (task_err != ESP_OK) { control_plane_stop_runtime_workers(); @@ -1486,6 +1518,7 @@ esp_err_t control_plane_start_runtime_workers(void) "cp_lcd_render", CONTROL_PLANE_LCD_RENDER_LOOP_TASK_STACK_SIZE, 4, + CONTROL_PLANE_LOCAL_TASK_CORE, &s_lcd_render_loop_task); if (task_err != ESP_OK) { control_plane_stop_runtime_workers(); @@ -1501,6 +1534,7 @@ esp_err_t control_plane_start_runtime_workers(void) "cp_wifi_state", CONTROL_PLANE_WIFI_STATE_TASK_STACK_SIZE, 4, + CONTROL_PLANE_NETWORK_TASK_CORE, &s_wifi_state_task); if (task_err != ESP_OK) { control_plane_stop_runtime_workers(); @@ -1514,6 +1548,7 @@ esp_err_t control_plane_start_runtime_workers(void) "cp_task_monitor", CONTROL_PLANE_TASK_MONITOR_TASK_STACK_SIZE, 3, + CONTROL_PLANE_LOCAL_TASK_CORE, &s_task_monitor_task); if (task_err != ESP_OK) { control_plane_stop_runtime_workers(); @@ -1541,6 +1576,7 @@ esp_err_t control_plane_start_runtime_workers(void) "cp_fortune", CONTROL_PLANE_FORTUNE_TASK_STACK_SIZE, 4, + CONTROL_PLANE_NETWORK_TASK_CORE, &s_daily_fortune_task); if (task_err != ESP_OK) { control_plane_stop_runtime_workers(); diff --git a/components/control_plane/src/runtime/control_plane_system_events.c b/components/control_plane/src/runtime/control_plane_system_events.c index 40d045d..a72036d 100644 --- a/components/control_plane/src/runtime/control_plane_system_events.c +++ b/components/control_plane/src/runtime/control_plane_system_events.c @@ -30,6 +30,16 @@ #define CONFIG_TQ_SYSTEM_EVENT_TASK_STACK 4096 #endif +#ifndef CONFIG_TQ_LOCAL_TASK_CORE +#define CONFIG_TQ_LOCAL_TASK_CORE 1 +#endif + +#if CONFIG_TQ_LOCAL_TASK_CORE < 0 +#define CONTROL_PLANE_SYSTEM_EVENT_TASK_CORE tskNO_AFFINITY +#else +#define CONTROL_PLANE_SYSTEM_EVENT_TASK_CORE ((BaseType_t)CONFIG_TQ_LOCAL_TASK_CORE) +#endif + static const char *TAG = "cp_system_event"; static QueueHandle_t s_system_event_queue; @@ -192,12 +202,13 @@ esp_err_t control_plane_start_system_event_task(void) } s_stop_requested = false; - BaseType_t created = xTaskCreate(control_plane_system_event_task, - "cp_system_event", - CONFIG_TQ_SYSTEM_EVENT_TASK_STACK, - NULL, - 4, - &s_system_event_task); + BaseType_t created = xTaskCreatePinnedToCore(control_plane_system_event_task, + "cp_system_event", + CONFIG_TQ_SYSTEM_EVENT_TASK_STACK, + NULL, + 4, + &s_system_event_task, + CONTROL_PLANE_SYSTEM_EVENT_TASK_CORE); if (created != pdPASS) { s_system_event_task = NULL; return ESP_ERR_NO_MEM; diff --git a/components/platform/src/multimodal/transport_ws.c b/components/platform/src/multimodal/transport_ws.c index 7505ffa..cefd667 100644 --- a/components/platform/src/multimodal/transport_ws.c +++ b/components/platform/src/multimodal/transport_ws.c @@ -94,10 +94,14 @@ #define CONFIG_MULTIMODAL_AUDIO_TASK_CORE 1 #endif -#if CONFIG_MULTIMODAL_AUDIO_TASK_CORE < 0 -#define MULTIMODAL_AUDIO_CORE_ID tskNO_AFFINITY +#ifndef CONFIG_TQ_NETWORK_TASK_CORE +#define CONFIG_TQ_NETWORK_TASK_CORE 0 +#endif + +#if CONFIG_TQ_NETWORK_TASK_CORE < 0 +#define MULTIMODAL_WS_CORE_ID tskNO_AFFINITY #else -#define MULTIMODAL_AUDIO_CORE_ID ((BaseType_t)CONFIG_MULTIMODAL_AUDIO_TASK_CORE) +#define MULTIMODAL_WS_CORE_ID ((BaseType_t)CONFIG_TQ_NETWORK_TASK_CORE) #endif #define WS_OPCODE_TEXT 0x1 diff --git a/components/platform/src/multimodal/transport_ws/transport_ws_runtime_impl.c b/components/platform/src/multimodal/transport_ws/transport_ws_runtime_impl.c index b6f80fd..502a05a 100644 --- a/components/platform/src/multimodal/transport_ws/transport_ws_runtime_impl.c +++ b/components/platform/src/multimodal/transport_ws/transport_ws_runtime_impl.c @@ -368,7 +368,7 @@ static esp_err_t ws_start_async_stop(void) 5, &task, true, - tskNO_AFFINITY); + MULTIMODAL_WS_CORE_ID); if (ok != pdPASS) { ws_set_async_stop_task(NULL); ESP_LOGE(TAG, "Create WebSocket async stop task failed"); diff --git a/components/platform/src/multimodal/transport_ws/transport_ws_workers_impl.c b/components/platform/src/multimodal/transport_ws/transport_ws_workers_impl.c index 58cd7cb..4eb98f2 100644 --- a/components/platform/src/multimodal/transport_ws/transport_ws_workers_impl.c +++ b/components/platform/src/multimodal/transport_ws/transport_ws_workers_impl.c @@ -641,7 +641,7 @@ static esp_err_t create_worker_pipeline(void) CONFIG_MULTIMODAL_WEBSOCKET_TASK_PRIORITY, &s_ws_dispatch_task, true, - tskNO_AFFINITY) != pdPASS) { + MULTIMODAL_WS_CORE_ID) != pdPASS) { (void)destroy_worker_pipeline_until( ws_stop_deadline_from_timeout(MULTIMODAL_WS_WORKER_STOP_WAIT_MS)); return ESP_ERR_NO_MEM; diff --git a/components/platform/src/runtime/platform_lan_http_server.c b/components/platform/src/runtime/platform_lan_http_server.c index 3a005df..9cbf028 100644 --- a/components/platform/src/runtime/platform_lan_http_server.c +++ b/components/platform/src/runtime/platform_lan_http_server.c @@ -35,6 +35,16 @@ #define LAN_HTTP_START_TIMEOUT_MS 1500 #define LAN_HTTP_STOP_POLL_MS 20 +#ifndef CONFIG_TQ_NETWORK_TASK_CORE +#define CONFIG_TQ_NETWORK_TASK_CORE 0 +#endif + +#if CONFIG_TQ_NETWORK_TASK_CORE < 0 +#define LAN_HTTP_TASK_CORE tskNO_AFFINITY +#else +#define LAN_HTTP_TASK_CORE ((BaseType_t)CONFIG_TQ_NETWORK_TASK_CORE) +#endif + #if (configSUPPORT_STATIC_ALLOCATION == 1) && \ ((defined(CONFIG_FREERTOS_TASK_CREATE_ALLOW_EXT_MEM) && CONFIG_FREERTOS_TASK_CREATE_ALLOW_EXT_MEM) || \ defined(CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY)) @@ -111,7 +121,7 @@ static BaseType_t lan_http_create_task(TaskHandle_t *out_handle) NULL, LAN_HTTP_TASK_PRIORITY, out_handle, - tskNO_AFFINITY, + LAN_HTTP_TASK_CORE, MALLOC_CAP_SPIRAM | MALLOC_CAP_8BIT); if (created == pdPASS) { return pdPASS; @@ -124,15 +134,16 @@ static BaseType_t lan_http_create_task(TaskHandle_t *out_handle) NULL, LAN_HTTP_TASK_PRIORITY, out_handle, - tskNO_AFFINITY, + LAN_HTTP_TASK_CORE, MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT); #else - return xTaskCreate(server_task, - "lan_http", - LAN_HTTP_TASK_STACK_SIZE, - NULL, - LAN_HTTP_TASK_PRIORITY, - out_handle); + return xTaskCreatePinnedToCore(server_task, + "lan_http", + LAN_HTTP_TASK_STACK_SIZE, + NULL, + LAN_HTTP_TASK_PRIORITY, + out_handle, + LAN_HTTP_TASK_CORE); #endif } diff --git a/main/Kconfig.projbuild b/main/Kconfig.projbuild index b8f6184..e88d208 100644 --- a/main/Kconfig.projbuild +++ b/main/Kconfig.projbuild @@ -72,6 +72,22 @@ menu "Example Configuration" Optional boot sound file path for the voice prompt backend. Leave empty to use the semantic connecting prompt fallback. + config TQ_NETWORK_TASK_CORE + int "Network task core (-1 for no affinity)" + default 0 + range -1 1 + help + Core used for control-plane and platform network workers such + as WebSocket wait, Wi-Fi state, LAN HTTP, and fortune refresh. + + config TQ_LOCAL_TASK_CORE + int "Local task core (-1 for no affinity)" + default 1 + range -1 1 + help + Core used for local device workers such as LCD rendering, + key input, system events, direction console, and diagnostics. + config TQ_TASK_MONITOR_ENABLE bool "Enable periodic FreeRTOS task monitor log" default y diff --git a/sdkconfig.defaults b/sdkconfig.defaults index 8dcc67d..b7c25a0 100644 --- a/sdkconfig.defaults +++ b/sdkconfig.defaults @@ -17,6 +17,8 @@ CONFIG_TQ_TASK_MONITOR_ENABLE=y # CONFIG_TQ_BOOT_SEQUENCE_DRY_RUN is not set CONFIG_TQ_BOOT_SOUND_TIMEOUT_MS=3000 CONFIG_TQ_BOOT_SOUND_FILE="" +CONFIG_TQ_NETWORK_TASK_CORE=0 +CONFIG_TQ_LOCAL_TASK_CORE=1 CONFIG_TQ_TASK_MONITOR_INTERVAL_MS=10000 CONFIG_TQ_TASK_MONITOR_MAX_TASKS=64 CONFIG_TQ_SYSTEM_EVENT_ENABLE=y