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>
This commit is contained in:
committed by
Linus Torvalds
parent
688035f729
commit
c822f6223d
@@ -1090,14 +1090,10 @@ static void free_pcppages_bulk(struct zone *zone, int count,
|
||||
{
|
||||
int migratetype = 0;
|
||||
int batch_free = 0;
|
||||
unsigned long nr_scanned;
|
||||
bool isolated_pageblocks;
|
||||
|
||||
spin_lock(&zone->lock);
|
||||
isolated_pageblocks = has_isolate_pageblock(zone);
|
||||
nr_scanned = node_page_state(zone->zone_pgdat, NR_PAGES_SCANNED);
|
||||
if (nr_scanned)
|
||||
__mod_node_page_state(zone->zone_pgdat, NR_PAGES_SCANNED, -nr_scanned);
|
||||
|
||||
while (count) {
|
||||
struct page *page;
|
||||
@@ -1150,12 +1146,7 @@ static void free_one_page(struct zone *zone,
|
||||
unsigned int order,
|
||||
int migratetype)
|
||||
{
|
||||
unsigned long nr_scanned;
|
||||
spin_lock(&zone->lock);
|
||||
nr_scanned = node_page_state(zone->zone_pgdat, NR_PAGES_SCANNED);
|
||||
if (nr_scanned)
|
||||
__mod_node_page_state(zone->zone_pgdat, NR_PAGES_SCANNED, -nr_scanned);
|
||||
|
||||
if (unlikely(has_isolate_pageblock(zone) ||
|
||||
is_migrate_isolate(migratetype))) {
|
||||
migratetype = get_pfnblock_migratetype(page, pfn);
|
||||
@@ -4504,7 +4495,6 @@ void show_free_areas(unsigned int filter, nodemask_t *nodemask)
|
||||
#endif
|
||||
" writeback_tmp:%lukB"
|
||||
" unstable:%lukB"
|
||||
" pages_scanned:%lu"
|
||||
" all_unreclaimable? %s"
|
||||
"\n",
|
||||
pgdat->node_id,
|
||||
@@ -4527,7 +4517,6 @@ void show_free_areas(unsigned int filter, nodemask_t *nodemask)
|
||||
#endif
|
||||
K(node_page_state(pgdat, NR_WRITEBACK_TEMP)),
|
||||
K(node_page_state(pgdat, NR_UNSTABLE_NFS)),
|
||||
node_page_state(pgdat, NR_PAGES_SCANNED),
|
||||
pgdat->kswapd_failures >= MAX_RECLAIM_RETRIES ?
|
||||
"yes" : "no");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user