mm: remove unused pgdat_reclaimable_pages()
authorJan Kara <jack@suse.cz>
Thu, 1 Feb 2018 00:17:06 +0000 (16:17 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 1 Feb 2018 01:18:37 +0000 (17:18 -0800)
Remove unused function pgdat_reclaimable_pages() and
node_page_state_snapshot() which becomes unused as well.

Link: http://lkml.kernel.org/r/20171122094416.26019-1-jack@suse.cz
Signed-off-by: Jan Kara <jack@suse.cz>
Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/swap.h
include/linux/vmstat.h
mm/vmscan.c

index 0bd4c25016f95e97e57596cc6da76db9ab162642..7b6a59f722a39eda9db1b8de902001c434b0be80 100644 (file)
@@ -344,7 +344,6 @@ extern void lru_cache_add_active_or_unevictable(struct page *page,
 
 /* linux/mm/vmscan.c */
 extern unsigned long zone_reclaimable_pages(struct zone *zone);
-extern unsigned long pgdat_reclaimable_pages(struct pglist_data *pgdat);
 extern unsigned long try_to_free_pages(struct zonelist *zonelist, int order,
                                        gfp_t gfp_mask, nodemask_t *mask);
 extern int __isolate_lru_page(struct page *page, isolate_mode_t mode);
index 1779c9817b39aca623b88ad6b0d2d363899379e5..a4c2317d8b9f770ac67d0b0bc03cf36f464573fa 100644 (file)
@@ -216,23 +216,6 @@ static inline unsigned long zone_page_state_snapshot(struct zone *zone,
        return x;
 }
 
-static inline unsigned long node_page_state_snapshot(pg_data_t *pgdat,
-                                       enum node_stat_item item)
-{
-       long x = atomic_long_read(&pgdat->vm_stat[item]);
-
-#ifdef CONFIG_SMP
-       int cpu;
-       for_each_online_cpu(cpu)
-               x += per_cpu_ptr(pgdat->per_cpu_nodestats, cpu)->vm_node_stat_diff[item];
-
-       if (x < 0)
-               x = 0;
-#endif
-       return x;
-}
-
-
 #ifdef CONFIG_NUMA
 extern void __inc_numa_state(struct zone *zone, enum numa_stat_item item);
 extern unsigned long sum_zone_node_page_state(int node,
index 153e0795f4f006d21bfba500b916c72ca4164a25..1a33c8e1e75897347c936c05a3771652e9873c3a 100644 (file)
@@ -220,22 +220,6 @@ unsigned long zone_reclaimable_pages(struct zone *zone)
        return nr;
 }
 
-unsigned long pgdat_reclaimable_pages(struct pglist_data *pgdat)
-{
-       unsigned long nr;
-
-       nr = node_page_state_snapshot(pgdat, NR_ACTIVE_FILE) +
-            node_page_state_snapshot(pgdat, NR_INACTIVE_FILE) +
-            node_page_state_snapshot(pgdat, NR_ISOLATED_FILE);
-
-       if (get_nr_swap_pages() > 0)
-               nr += node_page_state_snapshot(pgdat, NR_ACTIVE_ANON) +
-                     node_page_state_snapshot(pgdat, NR_INACTIVE_ANON) +
-                     node_page_state_snapshot(pgdat, NR_ISOLATED_ANON);
-
-       return nr;
-}
-
 /**
  * lruvec_lru_size -  Returns the number of pages on the given LRU list.
  * @lruvec: lru vector