代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/gazelle 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From ce951a907f5634e8502d28fb66ae79a3a3c82689 Mon Sep 17 00:00:00 2001
From: wuchangsheng <wuchangsheng2@huawei.com>
Date: Fri, 11 Mar 2022 21:19:19 +0800
Subject: [PATCH 21/34] fix pasre numacpulist
---
src/lstack/core/lstack_cfg.c | 19 ++++++++-----------
1 file changed, 8 insertions(+), 11 deletions(-)
diff --git a/src/lstack/core/lstack_cfg.c b/src/lstack/core/lstack_cfg.c
index e5a92ca..058a392 100644
--- a/src/lstack/core/lstack_cfg.c
+++ b/src/lstack/core/lstack_cfg.c
@@ -323,25 +323,22 @@ static int32_t numa_to_cpusnum(unsigned socket_id, uint32_t *cpulist, int32_t nu
static int32_t stack_idle_cpuset(struct protocol_stack *stack, cpu_set_t *exclude)
{
- int32_t cpunum;
uint32_t cpulist[CPUS_RANGE_NUM];
- cpunum = numa_to_cpusnum(stack->socket_id, cpulist, CPUS_RANGE_NUM);
- if (cpunum <= 0 || cpunum % 2 != 0) { // 2 : even
+ int32_t cpunum = numa_to_cpusnum(stack->socket_id, cpulist, CPUS_RANGE_NUM);
+ if (cpunum <= 0 ) {
LSTACK_LOG(ERR, LSTACK, "numa_to_cpusnum failed\n");
return -1;
}
CPU_ZERO(&stack->idle_cpuset);
- for (uint32_t n = 0; n < cpunum; n += 2) { // 2 : even
- for (uint32_t i = cpulist[n]; i <= cpulist[n + 1]; i++) {
- /* skip stack cpu */
- if (CPU_ISSET(i, exclude)) {
- continue;
- }
-
- CPU_SET(i, &stack->idle_cpuset);
+ for (int32_t i = 0; i < cpunum; i++) {
+ /* skip stack cpu */
+ if (CPU_ISSET(cpulist[i], exclude)) {
+ continue;
}
+
+ CPU_SET(cpulist[i], &stack->idle_cpuset);
}
return 0;
--
1.8.3.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。