提交 f30182b3 编写于 作者: G Guo Mengqi 提交者: Zheng Zengkai

mm: sharepool: use built-in-statistics

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I5J0YW
CVE: NA
--------------------------------

Sharepool owns an statistics system which allow user to check the memory
use easily. The statistics codes are quite independent from the major
functions. However, the realization is very similar with the major
functions, which doubles the lock use and cause nesting problems.

Thus we remove the statistics system, and put all the statistics into raw
data structures as built-in statistics. The user api did not change.
This can greatly reduce the complexity of locks, as well as remove hundred
lines of redundant codes.
Signed-off-by: NGuo Mengqi <guomengqi3@huawei.com>
Reviewed-by: NWeilong Chen <chenweilong@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 6cfda1d2
......@@ -65,6 +65,7 @@ extern int sysctl_sp_perf_alloc;
extern int sysctl_sp_perf_k2u;
#ifdef __GENKSYMS__
/* we estimate an sp-group ususally contains at most 64 sp-group */
#define SP_SPG_HASH_BITS 6
......@@ -206,6 +207,7 @@ struct sp_group_node {
struct sp_group *spg;
unsigned long prot;
};
#endif
struct sp_walk_data {
struct page **pages;
......@@ -508,11 +510,6 @@ static inline bool mg_is_sharepool_addr(unsigned long addr)
return false;
}
static inline struct sp_proc_stat *sp_get_proc_stat_ref(struct mm_struct *mm)
{
return NULL;
}
static inline void spa_overview_show(struct seq_file *seq)
{
}
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册