6 Star 0 Fork 21

src-openEuler/numactl

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0002-libnuma-Fix-incorrect-print-and-exit-of-numa_preferr.patch 1.01 KB
一键复制 编辑 原始数据 按行查看 历史
From 00dd4c32240694ae8619ed5445e4ffbc463f8eb0 Mon Sep 17 00:00:00 2001
From: Chunsheng Luo <luochunsheng@ustc.edu>
Date: Fri, 26 Jan 2024 00:30:13 +0800
Subject: [PATCH] libnuma: Fix incorrect print and exit of numa_preferred/_many
APIs
Only when policy is preferred, numa_bitmask_weight will be judged,
because mbind and preferred_many support multiple nodes.
fixes: 87c6834("libnuma: Convert preferred node into a mask")
Signed-off-by: Chunsheng Luo <luochunsheng@ustc.edu>
Conflict: NA
Reference: https://github.com/numactl/numactl/commit/00dd4c32240694ae8619ed5445e4ffbc463f8eb0
---
libnuma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libnuma.c b/libnuma.c
index e898297..ef93558 100644
--- a/libnuma.c
+++ b/libnuma.c
@@ -1882,7 +1882,7 @@ static struct bitmask *__numa_preferred(void)
policy != MPOL_BIND)
return bmp;
- if (numa_bitmask_weight(bmp) > 1) {
+ if (policy == MPOL_PREFERRED && numa_bitmask_weight(bmp) > 1) {
errno = EINVAL;
numa_error(__FILE__);
}
--
2.27.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/numactl.git
git@gitee.com:src-openeuler/numactl.git
src-openeuler
numactl
numactl
master

搜索帮助