Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 61b129b0 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "taskstats: remove redundant MM_STAT config check"

parents e399dc50 9d12d29a
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
/*
 * Copyright (c) 2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
 */

#ifndef _LINUX_SYSSTATS_H
@@ -25,9 +25,7 @@ struct sys_memstats {
	__u64	zram_compressed;
	__u64	swap_used;
	__u64	swap_total;
#ifdef CONFIG_MM_STAT_UNRECLAIMABLE_PAGES
	__u64	unreclaimable;
#endif
	__u64	buffer;
	__u64	slab_reclaimable;
	__u64	slab_unreclaimable;
+0 −2
Original line number Diff line number Diff line
@@ -179,9 +179,7 @@ struct taskstats2 {
	__u64 file_rss;	/* KB */
	__u64 swap_rss;	/* KB */
	__u64 shmem_rss;	/* KB */
#ifdef CONFIG_MM_STAT_UNRECLAIMABLE_PAGES
	__u64 unreclaimable;	/* KB */
#endif
	/* version 1 ends here */
};

+4 −0
Original line number Diff line number Diff line
@@ -489,6 +489,8 @@ static void sysstats_build(struct sys_memstats *stats)
#ifdef CONFIG_MM_STAT_UNRECLAIMABLE_PAGES
	stats->unreclaimable =
		K(global_node_page_state(NR_UNRECLAIMABLE_PAGES));
#else
	stats->unreclaimable = 0;
#endif
	stats->buffer = K(i.bufferram);
	stats->swapcache = K(total_swapcache_pages());
@@ -682,6 +684,8 @@ static int taskstats2_cmd_attr_pid(struct genl_info *info)
#ifdef CONFIG_MM_STAT_UNRECLAIMABLE_PAGES
		stats->unreclaimable =
				K(get_mm_counter(p->mm, MM_UNRECLAIMABLE));
#else
		stats->unreclaimable = 0;
#endif
#undef K
		task_unlock(p);