9 Star 4 Fork 21

src-openEuler/etmem

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0008-etmem-set-scan_type-optional-and-fix-sequence-of-head.patch 2.25 KB
一键复制 编辑 原始数据 按行查看 历史
From e0703d2fc07f99c184d678d1d33ccf6fa7855d81 Mon Sep 17 00:00:00 2001
From: chenrenhui <chenrenhui1@huawei.com>
Date: Thu, 15 Aug 2024 20:29:15 +0800
Subject: [PATCH] etmem: set scan_type optional, and fix sequence of header file
Signed-off-by: chenrenhui <chenrenhui1@huawei.com>
---
etmem/inc/etmemd_inc/etmemd_thirdparty_export.h | 2 +-
etmem/src/etmemd_src/etmemd_file.c | 3 +++
etmem/src/etmemd_src/etmemd_project.c | 2 +-
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/etmem/inc/etmemd_inc/etmemd_thirdparty_export.h b/etmem/inc/etmemd_inc/etmemd_thirdparty_export.h
index 9d145ce..6cd8094 100644
--- a/etmem/inc/etmemd_inc/etmemd_thirdparty_export.h
+++ b/etmem/inc/etmemd_inc/etmemd_thirdparty_export.h
@@ -16,8 +16,8 @@
#ifndef ETMEM_THIRDPARTY_EXPORT_H
#define ETMEM_THIRDPARTY_EXPORT_H
-#include "etmemd_project_exp.h"
#include "etmemd_engine_exp.h"
+#include "etmemd_project_exp.h"
#include "etmemd_task_exp.h"
#endif
diff --git a/etmem/src/etmemd_src/etmemd_file.c b/etmem/src/etmemd_src/etmemd_file.c
index d204685..8e739d0 100644
--- a/etmem/src/etmemd_src/etmemd_file.c
+++ b/etmem/src/etmemd_src/etmemd_file.c
@@ -22,6 +22,9 @@ static int parse_item(GKeyFile *config, char *group_name, struct config_item *it
void *val;
if (!g_key_file_has_key(config, group_name, item->key, NULL)) {
+ if (strcmp(item->key, "scan_type") == 0) {
+ return item->fill(obj, "page");
+ }
if (item->option) {
return 0;
}
diff --git a/etmem/src/etmemd_src/etmemd_project.c b/etmem/src/etmemd_src/etmemd_project.c
index d1c34f3..4990fdb 100644
--- a/etmem/src/etmemd_src/etmemd_project.c
+++ b/etmem/src/etmemd_src/etmemd_project.c
@@ -716,7 +716,7 @@ static bool check_swapcache_wmark_valid(struct project *proj)
static struct config_item g_project_config_items[] = {
{"name", STR_VAL, fill_project_name, false},
- {"scan_type", STR_VAL, fill_project_scan_type, false},
+ {"scan_type", STR_VAL, fill_project_scan_type, true},
{"sysmem_threshold", INT_VAL, fill_project_sysmem_threshold, true},
{"swapcache_high_wmark", INT_VAL, fill_project_swapcache_high_wmark, true},
{"swapcache_low_wmark", INT_VAL, fill_project_swapcache_low_wmark, true},
--
2.45.1.windows.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/etmem.git
git@gitee.com:src-openeuler/etmem.git
src-openeuler
etmem
etmem
master

搜索帮助