mm: Remove unused pgdat_reclaimable_pages()
Subsystems (5)
PATCH 1/1 mm: Remove unused pgdat_reclaimable_pages()
Remove unused function pgdat_reclaimable_pages() and node_page_state_snapshot() which becomes unused as well.
Signed-off-by Jan Kara <[email protected]>
--- include/linux/swap.h | 1 - include/linux/vmstat.h | 17 ----------------- mm/vmscan.c | 16 ---------------- 3 files changed, 34 deletions(-)
include/linux/swap.h +0 -1
@@ -345,7 +345,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);
include/linux/vmstat.h +0 -17
@@ -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,
mm/vmscan.c +0 -16
@@ -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
Signature · 7 lines
2.12.3 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 2 lines · Jan Kara
Remove unused function
pgdat_reclaimable_pages()andnode_page_state_snapshot()which becomes unused as well.
It's good to see it go. _snaphost thingy has always been a hack and most users of pgdat_reclaimable_pages were hackish as well.
Quoted 1 line
Signed-off-by Jan Kara <[email protected]>
Acked-by Michal Hocko <[email protected]>
Quoted 81 lines
--- include/linux/swap.h | 1 - include/linux/vmstat.h | 17 ----------------- mm/vmscan.c | 16 ---------------- 3 files changed, 34 deletions(-)include/linux/swap.h +0
-1@@ -345,7 +345,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);include/linux/vmstat.h +0
-17@@ -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,mm/vmscan.c +0
-16@@ -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 Signature · 7 lines
2.12.3 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Signature · 8 lines
Michal Hocko SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>