代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/etmem 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 910519ccf986b80a7ee5a5aab90b62828bdc8b84 Mon Sep 17 00:00:00 2001
From: Kemeng Shi <shikemeng@huawei.com>
Date: Wed, 28 Apr 2021 09:54:06 +0800
Subject: [PATCH 07/50] fix error when open idle_pages failed
Signed-off-by: Kemeng Shi <shikemeng@huawei.com>
---
src/etmemd_src/etmemd_cslide.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/etmemd_src/etmemd_cslide.c b/src/etmemd_src/etmemd_cslide.c
index 3983a32..618cafe 100644
--- a/src/etmemd_src/etmemd_cslide.c
+++ b/src/etmemd_src/etmemd_cslide.c
@@ -1281,7 +1281,6 @@ static int cslide_scan_vmas(struct cslide_pid_params *params)
scan_fp = etmemd_get_proc_file(pid, IDLE_SCAN_FILE, SCAN_AS_HUGE, "r");
if (scan_fp == NULL) {
etmemd_log(ETMEMD_LOG_ERR, "open %s file for pid %u fail\n", IDLE_SCAN_FILE, params->pid);
- params->vma_pf = NULL;
return -1;
}
@@ -1298,7 +1297,6 @@ static int cslide_scan_vmas(struct cslide_pid_params *params)
walk_address.walk_end = vma->end;
if (walk_vmas(fd, &walk_address, &vma_pf->page_refs, NULL) == NULL) {
etmemd_log(ETMEMD_LOG_ERR, "scan vma start %llu end %llu fail\n", vma->start, vma->end);
- cslide_free_vmas(params);
fclose(scan_fp);
return -1;
}
@@ -1308,6 +1306,8 @@ static int cslide_scan_vmas(struct cslide_pid_params *params)
return 0;
}
+// allocted data will be cleaned in cslide_main->cslide_clean_params
+// ->cslide_free_vmas
static int cslide_do_scan(struct cslide_eng_params *eng_params)
{
struct cslide_pid_params *iter = NULL;
@@ -1531,7 +1531,9 @@ static void cslide_clean_params(struct cslide_eng_params *eng_params)
struct cslide_pid_params *iter = NULL;
factory_foreach_pid_params(iter, &eng_params->factory) {
+ // clean memory allocted in cslide_policy
clean_pid_param(iter);
+ // clean memory allocted in cslide_do_scan
cslide_free_vmas(iter);
}
}
--
2.27.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。