1 Star 0 Fork 32

yc555/gazelle_1

forked from src-openEuler/gazelle 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0229-fix-redis-coredump-when-hugetlbs-pagesize-is-1024M.patch 1.31 KB
一键复制 编辑 原始数据 按行查看 历史
From 5dff08d02b2561ca39d7e569b9870f7a315080f0 Mon Sep 17 00:00:00 2001
From: yangchen <yangchen145@huawei.com>
Date: Tue, 16 Jul 2024 22:24:04 +0800
Subject: [PATCH] fix redis coredump when hugetlbs pagesize is 1024M
---
src/lstack/core/lstack_init.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/src/lstack/core/lstack_init.c b/src/lstack/core/lstack_init.c
index a5a4a4e..629c790 100644
--- a/src/lstack/core/lstack_init.c
+++ b/src/lstack/core/lstack_init.c
@@ -113,8 +113,16 @@ void gazelle_exit(void)
/* 1: wait until app thread call send functio complete */
sleep(1);
stack_group_exit();
+}
+void dpdk_exit(void)
+{
if (!use_ltran()) {
+ int ret = rte_pdump_uninit();
+ if (ret < 0) {
+ LSTACK_LOG(ERR, LSTACK, "rte_pdump_uninit failed\n");
+ }
+
#if RTE_VERSION < RTE_VERSION_NUM(23, 11, 0, 0)
dpdk_kni_release();
#endif
@@ -126,13 +134,7 @@ __attribute__((destructor)) void gazelle_network_exit(void)
if (posix_api != NULL && !posix_api->use_kernel) {
lwip_exit();
gazelle_exit();
- }
-
- if (!use_ltran()) {
- int32_t ret = rte_pdump_uninit();
- if (ret < 0) {
- LSTACK_LOG(ERR, LSTACK, "rte_pdump_uninit failed\n");
- }
+ dpdk_exit();
}
}
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yangchen555/gazelle_1.git
git@gitee.com:yangchen555/gazelle_1.git
yangchen555
gazelle_1
gazelle_1
master

搜索帮助