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

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

Merge "taskstats: add support for system stats"

parents af1c8b84 5a5b186d
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -153,8 +153,19 @@ void free_buffer_page(struct ion_system_heap *heap,
			ion_page_pool_free_immediate(pool, page);
		else
			ion_page_pool_free(pool, page);

#ifdef CONFIG_MM_STAT_UNRECLAIMABLE_PAGES
		mod_node_page_state(page_pgdat(page), NR_UNRECLAIMABLE_PAGES,
				    -(1 << pool->order));
#endif
	} else {
		__free_pages(page, order);

#ifdef CONFIG_MM_STAT_UNRECLAIMABLE_PAGES
		mod_node_page_state(page_pgdat(page), NR_UNRECLAIMABLE_PAGES,
				    -(1 << order));
#endif

	}
}

@@ -314,6 +325,12 @@ static int ion_system_heap_allocate(struct ion_heap *heap,

		sz = (1 << info->order) * PAGE_SIZE;

#ifdef CONFIG_MM_STAT_UNRECLAIMABLE_PAGES
		mod_node_page_state(page_pgdat(info->page),
				    NR_UNRECLAIMABLE_PAGES,
				    (1 << (info->order)));
#endif

		if (info->from_pool) {
			list_add_tail(&info->list, &pages_from_pool);
		} else {
+1 −0
Original line number Diff line number Diff line
@@ -547,6 +547,7 @@ gen_headers_out_arm = [
    "linux/synclink.h",
    "linux/sysctl.h",
    "linux/sysinfo.h",
    "linux/sysstats.h",
    "linux/target_core_user.h",
    "linux/taskstats.h",
    "linux/tcp.h",
+1 −0
Original line number Diff line number Diff line
@@ -542,6 +542,7 @@ gen_headers_out_arm64 = [
    "linux/synclink.h",
    "linux/sysctl.h",
    "linux/sysinfo.h",
    "linux/sysstats.h",
    "linux/target_core_user.h",
    "linux/taskstats.h",
    "linux/tcp.h",
+3 −0
Original line number Diff line number Diff line
@@ -45,6 +45,9 @@ enum {
	MM_ANONPAGES,	/* Resident anonymous pages */
	MM_SWAPENTS,	/* Anonymous swap entries */
	MM_SHMEMPAGES,	/* Resident shared memory pages */
#ifdef CONFIG_MM_STAT_UNRECLAIMABLE_PAGES
	MM_UNRECLAIMABLE,	/* Unreclaimable pages, e.g. shared with HW */
#endif
	NR_MM_COUNTERS
};

+3 −0
Original line number Diff line number Diff line
@@ -259,6 +259,9 @@ enum node_stat_item {
	NR_DIRTIED,		/* page dirtyings since bootup */
	NR_WRITTEN,		/* page writings since bootup */
	NR_KERNEL_MISC_RECLAIMABLE,	/* reclaimable non-slab kernel pages */
#ifdef CONFIG_MM_STAT_UNRECLAIMABLE_PAGES
	NR_UNRECLAIMABLE_PAGES,
#endif
	NR_VM_NODE_STAT_ITEMS
};

Loading