path: root/mm/util.c
diff options
authorVlastimil Babka <>2018-10-26 15:05:46 -0700
committerLinus Torvalds <>2018-10-26 16:26:32 -0700
commitb29940c1abd7a4c3abeb926df0a5ec84d6902d47 (patch)
tree66fc77981adf0ad7ac1ca34c97150ad6585d974f /mm/util.c
parent2e03b4bc4ae84fcc0eee00e5ba5d228901d38809 (diff)
mm: rename and change semantics of nr_indirectly_reclaimable_bytes
The vmstat counter NR_INDIRECTLY_RECLAIMABLE_BYTES was introduced by commit eb59254608bc ("mm: introduce NR_INDIRECTLY_RECLAIMABLE_BYTES") with the goal of accounting objects that can be reclaimed, but cannot be allocated via a SLAB_RECLAIM_ACCOUNT cache. This is now possible via kmalloc() with __GFP_RECLAIMABLE flag, and the dcache external names user is converted. The counter is however still useful for accounting direct page allocations (i.e. not slab) with a shrinker, such as the ION page pool. So keep it, and: - change granularity to pages to be more like other counters; sub-page allocations should be able to use kmalloc - rename the counter to NR_KERNEL_MISC_RECLAIMABLE - expose the counter again in vmstat as "nr_kernel_misc_reclaimable"; we can again remove the check for not printing "hidden" counters Link: Signed-off-by: Vlastimil Babka <> Acked-by: Christoph Lameter <> Acked-by: Roman Gushchin <> Cc: Vijayanand Jitta <> Cc: Laura Abbott <> Cc: Sumit Semwal <> Cc: David Rientjes <> Cc: Johannes Weiner <> Cc: Joonsoo Kim <> Cc: Matthew Wilcox <> Cc: Mel Gorman <> Cc: Michal Hocko <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
Diffstat (limited to 'mm/util.c')
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/util.c b/mm/util.c
index 470f5cd80b64..f740754f5012 100644
--- a/mm/util.c
+++ b/mm/util.c
@@ -678,8 +678,7 @@ int __vm_enough_memory(struct mm_struct *mm, long pages, int cap_sys_admin)
* Part of the kernel memory, which can be released
* under memory pressure.
- free += global_node_page_state(
+ free += global_node_page_state(NR_KERNEL_MISC_RECLAIMABLE);
* Leave reserved pages. The pages are not for anonymous pages.