提交 cd172d0e 编写于 作者: P Peng Wu 提交者: Yang Yingliang

mm: do some clean up of accounting ReliableTaskUsed

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I4PM0X
CVE: NA

-----------------------------------------

Clean up redundant code of accounting ReliableTaskUsed.
Signed-off-by: NPeng Wu <wupeng58@huawei.com>
Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
Reviewed-by: NXie XiuQi <xiexiuqi@huawei.com>
Reviewed-by: NWei Li <liwei391@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 ea625d60
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
extern struct static_key_false mem_reliable; extern struct static_key_false mem_reliable;
extern bool reliable_enabled; extern bool reliable_enabled;
extern atomic_long_t reliable_task_used_nr_page;
extern unsigned long task_reliable_limit __read_mostly; extern unsigned long task_reliable_limit __read_mostly;
extern bool reliable_allow_fallback; extern bool reliable_allow_fallback;
extern bool shmem_reliable; extern bool shmem_reliable;
...@@ -76,10 +75,8 @@ static inline bool skip_none_movable_zone(gfp_t gfp, struct zoneref *z) ...@@ -76,10 +75,8 @@ static inline bool skip_none_movable_zone(gfp_t gfp, struct zoneref *z)
static inline void reliable_page_counter(struct page *page, static inline void reliable_page_counter(struct page *page,
struct mm_struct *mm, int val) struct mm_struct *mm, int val)
{ {
if (page_reliable(page)) { if (page_reliable(page))
atomic_long_add(val, &mm->reliable_nr_page); atomic_long_add(val, &mm->reliable_nr_page);
atomic_long_add(val, &reliable_task_used_nr_page);
}
} }
static inline bool reliable_mem_limit_check(unsigned long nr_page) static inline bool reliable_mem_limit_check(unsigned long nr_page)
......
...@@ -24,7 +24,6 @@ DEFINE_STATIC_KEY_FALSE(mem_reliable); ...@@ -24,7 +24,6 @@ DEFINE_STATIC_KEY_FALSE(mem_reliable);
bool reliable_enabled; bool reliable_enabled;
static atomic_long_t total_reliable_mem; static atomic_long_t total_reliable_mem;
atomic_long_t reliable_task_used_nr_page;
/* reliable user limit for user tasks with reliable flag */ /* reliable user limit for user tasks with reliable flag */
unsigned long task_reliable_limit = ULONG_MAX; unsigned long task_reliable_limit = ULONG_MAX;
bool reliable_allow_fallback __read_mostly = true; bool reliable_allow_fallback __read_mostly = true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册