37 lines
1.1 KiB
Diff
37 lines
1.1 KiB
Diff
From 9de8de67355430cfa9764109655af988cb7c031e Mon Sep 17 00:00:00 2001
|
|
From: Qi Tao <taoqi10@huawei.com>
|
|
Date: Mon, 4 Dec 2023 17:23:32 +0800
|
|
Subject: [PATCH 099/114] uadk: fix the failure process+bug
|
|
|
|
Assign numa_num to sched_ctx before err_out
|
|
for wd_scheduling_rr_release release memoryc orrectly.
|
|
|
|
Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com>
|
|
---
|
|
wd_sched.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/wd_sched.c b/wd_sched.c
|
|
index 7aeea73..419280e 100644
|
|
--- a/wd_sched.c
|
|
+++ b/wd_sched.c
|
|
@@ -642,6 +642,7 @@ struct wd_sched *wd_sched_rr_alloc(__u8 sched_type, __u8 type_num,
|
|
WD_ERR("failed to alloc memory for sched_ctx!\n");
|
|
goto err_out;
|
|
}
|
|
+ sched_ctx->numa_num = numa_num;
|
|
|
|
sched->h_sched_ctx = (handle_t)sched_ctx;
|
|
if (sched_type == SCHED_POLICY_NONE ||
|
|
@@ -662,7 +663,6 @@ simple_ok:
|
|
sched_ctx->poll_func = func;
|
|
sched_ctx->policy = sched_type;
|
|
sched_ctx->type_num = type_num;
|
|
- sched_ctx->numa_num = numa_num;
|
|
memset(sched_ctx->numa_map, -1, sizeof(int) * NUMA_NUM_NODES);
|
|
|
|
sched->sched_init = sched_table[sched_type].sched_init;
|
|
--
|
|
2.25.1
|
|
|