summaryrefslogtreecommitdiffstats
path: root/mm/vmstat.c
diff options
context:
space:
mode:
authorJohannes Weiner <hannes@cmpxchg.org>2017-05-03 17:52:10 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-05-03 18:52:08 -0400
commitc822f6223d03c2c5b026a21da09c6b6d523258cd (patch)
treeac2fdb0a28b2be80c1c1fd407d8a96b6155530e6 /mm/vmstat.c
parent688035f729dcd9a98152c827338805a061f5c6fa (diff)
mm: delete NR_PAGES_SCANNED and pgdat_reclaimable()
NR_PAGES_SCANNED counts number of pages scanned since the last page free event in the allocator. This was used primarily to measure the reclaimability of zones and nodes, and determine when reclaim should give up on them. In that role, it has been replaced in the preceding patches by a different mechanism. Being implemented as an efficient vmstat counter, it was automatically exported to userspace as well. It's however unlikely that anyone outside the kernel is using this counter in any meaningful way. Remove the counter and the unused pgdat_reclaimable(). Link: http://lkml.kernel.org/r/20170228214007.5621-8-hannes@cmpxchg.org Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> Acked-by: Hillf Danton <hillf.zj@alibaba-inc.com> Acked-by: Michal Hocko <mhocko@suse.com> Cc: Jia He <hejianet@gmail.com> Cc: Mel Gorman <mgorman@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/vmstat.c')
-rw-r--r--mm/vmstat.c22
1 files changed, 3 insertions, 19 deletions
diff --git a/mm/vmstat.c b/mm/vmstat.c
index baee70dafba8..c8d15051616b 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -954,7 +954,6 @@ const char * const vmstat_text[] = {
954 "nr_unevictable", 954 "nr_unevictable",
955 "nr_isolated_anon", 955 "nr_isolated_anon",
956 "nr_isolated_file", 956 "nr_isolated_file",
957 "nr_pages_scanned",
958 "workingset_refault", 957 "workingset_refault",
959 "workingset_activate", 958 "workingset_activate",
960 "workingset_nodereclaim", 959 "workingset_nodereclaim",
@@ -1378,7 +1377,6 @@ static void zoneinfo_show_print(struct seq_file *m, pg_data_t *pgdat,
1378 "\n min %lu" 1377 "\n min %lu"
1379 "\n low %lu" 1378 "\n low %lu"
1380 "\n high %lu" 1379 "\n high %lu"
1381 "\n node_scanned %lu"
1382 "\n spanned %lu" 1380 "\n spanned %lu"
1383 "\n present %lu" 1381 "\n present %lu"
1384 "\n managed %lu", 1382 "\n managed %lu",
@@ -1386,7 +1384,6 @@ static void zoneinfo_show_print(struct seq_file *m, pg_data_t *pgdat,
1386 min_wmark_pages(zone), 1384 min_wmark_pages(zone),
1387 low_wmark_pages(zone), 1385 low_wmark_pages(zone),
1388 high_wmark_pages(zone), 1386 high_wmark_pages(zone),
1389 node_page_state(zone->zone_pgdat, NR_PAGES_SCANNED),
1390 zone->spanned_pages, 1387 zone->spanned_pages,
1391 zone->present_pages, 1388 zone->present_pages,
1392 zone->managed_pages); 1389 zone->managed_pages);
@@ -1586,22 +1583,9 @@ int vmstat_refresh(struct ctl_table *table, int write,
1586 for (i = 0; i < NR_VM_ZONE_STAT_ITEMS; i++) { 1583 for (i = 0; i < NR_VM_ZONE_STAT_ITEMS; i++) {
1587 val = atomic_long_read(&vm_zone_stat[i]); 1584 val = atomic_long_read(&vm_zone_stat[i]);
1588 if (val < 0) { 1585 if (val < 0) {
1589 switch (i) { 1586 pr_warn("%s: %s %ld\n",
1590 case NR_PAGES_SCANNED: 1587 __func__, vmstat_text[i], val);
1591 /* 1588 err = -EINVAL;
1592 * This is often seen to go negative in
1593 * recent kernels, but not to go permanently
1594 * negative. Whilst it would be nicer not to
1595 * have exceptions, rooting them out would be
1596 * another task, of rather low priority.
1597 */
1598 break;
1599 default:
1600 pr_warn("%s: %s %ld\n",
1601 __func__, vmstat_text[i], val);
1602 err = -EINVAL;
1603 break;
1604 }
1605 } 1589 }
1606 } 1590 }
1607 if (err) 1591 if (err)