1 Star 0 Fork 18

chenhaixaing/numactl

forked from src-openEuler/numactl 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0006-numactl.c-Fix-merging-of-neighboring-pages-policies-.patch 1.02 KB
一键复制 编辑 原始数据 按行查看 历史
From 6587ed2e4b8ce6d1eb0812f89709101f2bfdd1f1 Mon Sep 17 00:00:00 2001
From: Ackerley Tng <ackerleytng@google.com>
Date: Wed, 15 Mar 2023 00:23:14 +0000
Subject: [PATCH] numactl.c: Fix merging of neighboring pages' policies in
dump_shm
In addition to checking that the policies are equal, also check that
the nodes are equal, since the policies may be the same but apply to
different nodes.
Fixes #170
Signed-off-by: buque <wuxu.wu@huawei.com>
---
shm.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/shm.c b/shm.c
index 5d0d1ab..66dbea4 100644
--- a/shm.c
+++ b/shm.c
@@ -205,11 +205,12 @@ void dump_shm(void)
if (get_mempolicy(&pol, nodes->maskp, nodes->size, c+shmptr,
MPOL_F_ADDR) < 0)
err("get_mempolicy on shm");
- if (pol == prevpol)
+ if (pol == prevpol && numa_bitmask_equal(prevnodes, nodes))
continue;
if (prevpol != -1)
dumppol(start, c, prevpol, prevnodes);
- prevnodes = nodes;
+
+ copy_bitmask_to_bitmask(nodes, prevnodes);
prevpol = pol;
start = c;
}
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/chenhaixaing/numactl.git
git@gitee.com:chenhaixaing/numactl.git
chenhaixaing
numactl
numactl
master

搜索帮助