Patchwork [1/6] mm: vmscan: delete unused pgdat_reclaimable_pages()

login
register
mail settings
Submitter Johannes Weiner
Date May 30, 2017, 6:17 p.m.
Message ID <20170530181724.27197-2-hannes@cmpxchg.org>
Download mbox | patch
Permalink /patch/9755093/
State New
Headers show

Comments

Johannes Weiner - May 30, 2017, 6:17 p.m.
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
---
 include/linux/swap.h |  1 -
 mm/vmscan.c          | 16 ----------------
 2 files changed, 17 deletions(-)
Andrew Morton - May 30, 2017, 9:50 p.m.
On Tue, 30 May 2017 14:17:19 -0400 Johannes Weiner <hannes@cmpxchg.org> wrote:

> -extern unsigned long pgdat_reclaimable_pages(struct pglist_data *pgdat);

Josef's "mm: make kswapd try harder to keep active pages in cache"
added a new callsite.
Johannes Weiner - May 30, 2017, 10:02 p.m.
On Tue, May 30, 2017 at 02:50:29PM -0700, Andrew Morton wrote:
> On Tue, 30 May 2017 14:17:19 -0400 Johannes Weiner <hannes@cmpxchg.org> wrote:
> 
> > -extern unsigned long pgdat_reclaimable_pages(struct pglist_data *pgdat);
> 
> Josef's "mm: make kswapd try harder to keep active pages in cache"
> added a new callsite.

Ah yes, I forgot you pulled that in. The next version of his patch
shouldn't need it anymore.

Patch

diff --git a/include/linux/swap.h b/include/linux/swap.h
index ba5882419a7d..6e3d1d0a7f48 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -289,7 +289,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);
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 8ad39bbc79e6..c5f9d1673392 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -219,22 +219,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