Loading drivers/staging/android/ion/ion_page_pool.c +5 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,9 @@ static int ion_page_pool_add(struct ion_page_pool *pool, struct page *page) list_add_tail(&page->lru, &pool->low_items); pool->low_count++; } mod_node_page_state(page_pgdat(page), NR_INDIRECTLY_RECLAIMABLE_BYTES, (1 << (PAGE_SHIFT + pool->order))); mutex_unlock(&pool->mutex); return 0; } Loading @@ -67,6 +70,8 @@ static struct page *ion_page_pool_remove(struct ion_page_pool *pool, bool high) } list_del(&page->lru); mod_node_page_state(page_pgdat(page), NR_INDIRECTLY_RECLAIMABLE_BYTES, -(1 << (PAGE_SHIFT + pool->order))); return page; } Loading include/linux/mmzone.h +1 −0 Original line number Diff line number Diff line Loading @@ -180,6 +180,7 @@ enum node_stat_item { NR_VMSCAN_IMMEDIATE, /* Prioritise for reclaim when writeback ends */ NR_DIRTIED, /* page dirtyings since bootup */ NR_WRITTEN, /* page writings since bootup */ NR_INDIRECTLY_RECLAIMABLE_BYTES, /* measured in bytes */ NR_VM_NODE_STAT_ITEMS }; Loading mm/page_alloc.c +7 −0 Original line number Diff line number Diff line Loading @@ -4558,6 +4558,13 @@ long si_mem_available(void) min(global_node_page_state(NR_SLAB_RECLAIMABLE) / 2, wmark_low); /* * Part of the kernel memory, which can be released under memory * pressure. */ available += global_node_page_state(NR_INDIRECTLY_RECLAIMABLE_BYTES) >> PAGE_SHIFT; if (available < 0) available = 0; return available; Loading mm/util.c +7 −0 Original line number Diff line number Diff line Loading @@ -635,6 +635,13 @@ int __vm_enough_memory(struct mm_struct *mm, long pages, int cap_sys_admin) */ free += global_node_page_state(NR_SLAB_RECLAIMABLE); /* * Part of the kernel memory, which can be released * under memory pressure. */ free += global_node_page_state( NR_INDIRECTLY_RECLAIMABLE_BYTES) >> PAGE_SHIFT; /* * Leave reserved pages. The pages are not for anonymous pages. */ Loading mm/vmstat.c +1 −0 Original line number Diff line number Diff line Loading @@ -1090,6 +1090,7 @@ const char * const vmstat_text[] = { "nr_vmscan_immediate_reclaim", "nr_dirtied", "nr_written", "nr_indirectly_reclaimable", /* enum writeback_stat_item counters */ "nr_dirty_threshold", Loading Loading
drivers/staging/android/ion/ion_page_pool.c +5 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,9 @@ static int ion_page_pool_add(struct ion_page_pool *pool, struct page *page) list_add_tail(&page->lru, &pool->low_items); pool->low_count++; } mod_node_page_state(page_pgdat(page), NR_INDIRECTLY_RECLAIMABLE_BYTES, (1 << (PAGE_SHIFT + pool->order))); mutex_unlock(&pool->mutex); return 0; } Loading @@ -67,6 +70,8 @@ static struct page *ion_page_pool_remove(struct ion_page_pool *pool, bool high) } list_del(&page->lru); mod_node_page_state(page_pgdat(page), NR_INDIRECTLY_RECLAIMABLE_BYTES, -(1 << (PAGE_SHIFT + pool->order))); return page; } Loading
include/linux/mmzone.h +1 −0 Original line number Diff line number Diff line Loading @@ -180,6 +180,7 @@ enum node_stat_item { NR_VMSCAN_IMMEDIATE, /* Prioritise for reclaim when writeback ends */ NR_DIRTIED, /* page dirtyings since bootup */ NR_WRITTEN, /* page writings since bootup */ NR_INDIRECTLY_RECLAIMABLE_BYTES, /* measured in bytes */ NR_VM_NODE_STAT_ITEMS }; Loading
mm/page_alloc.c +7 −0 Original line number Diff line number Diff line Loading @@ -4558,6 +4558,13 @@ long si_mem_available(void) min(global_node_page_state(NR_SLAB_RECLAIMABLE) / 2, wmark_low); /* * Part of the kernel memory, which can be released under memory * pressure. */ available += global_node_page_state(NR_INDIRECTLY_RECLAIMABLE_BYTES) >> PAGE_SHIFT; if (available < 0) available = 0; return available; Loading
mm/util.c +7 −0 Original line number Diff line number Diff line Loading @@ -635,6 +635,13 @@ int __vm_enough_memory(struct mm_struct *mm, long pages, int cap_sys_admin) */ free += global_node_page_state(NR_SLAB_RECLAIMABLE); /* * Part of the kernel memory, which can be released * under memory pressure. */ free += global_node_page_state( NR_INDIRECTLY_RECLAIMABLE_BYTES) >> PAGE_SHIFT; /* * Leave reserved pages. The pages are not for anonymous pages. */ Loading
mm/vmstat.c +1 −0 Original line number Diff line number Diff line Loading @@ -1090,6 +1090,7 @@ const char * const vmstat_text[] = { "nr_vmscan_immediate_reclaim", "nr_dirtied", "nr_written", "nr_indirectly_reclaimable", /* enum writeback_stat_item counters */ "nr_dirty_threshold", Loading