mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
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/[email protected] Signed-off-by: Johannes Weiner <[email protected]> Acked-by: Hillf Danton <[email protected]> Acked-by: Michal Hocko <[email protected]> Cc: Jia He <[email protected]> Cc: Mel Gorman <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
688035f729
commit
c822f6223d
5 changed files with 3 additions and 41 deletions
|
|
@ -230,12 +230,6 @@ unsigned long pgdat_reclaimable_pages(struct pglist_data *pgdat)
|
|||
return nr;
|
||||
}
|
||||
|
||||
bool pgdat_reclaimable(struct pglist_data *pgdat)
|
||||
{
|
||||
return node_page_state_snapshot(pgdat, NR_PAGES_SCANNED) <
|
||||
pgdat_reclaimable_pages(pgdat) * 6;
|
||||
}
|
||||
|
||||
/**
|
||||
* lruvec_lru_size - Returns the number of pages on the given LRU list.
|
||||
* @lruvec: lru vector
|
||||
|
|
@ -1750,7 +1744,6 @@ shrink_inactive_list(unsigned long nr_to_scan, struct lruvec *lruvec,
|
|||
reclaim_stat->recent_scanned[file] += nr_taken;
|
||||
|
||||
if (global_reclaim(sc)) {
|
||||
__mod_node_page_state(pgdat, NR_PAGES_SCANNED, nr_scanned);
|
||||
if (current_is_kswapd())
|
||||
__count_vm_events(PGSCAN_KSWAPD, nr_scanned);
|
||||
else
|
||||
|
|
@ -1953,8 +1946,6 @@ static void shrink_active_list(unsigned long nr_to_scan,
|
|||
__mod_node_page_state(pgdat, NR_ISOLATED_ANON + file, nr_taken);
|
||||
reclaim_stat->recent_scanned[file] += nr_taken;
|
||||
|
||||
if (global_reclaim(sc))
|
||||
__mod_node_page_state(pgdat, NR_PAGES_SCANNED, nr_scanned);
|
||||
__count_vm_events(PGREFILL, nr_scanned);
|
||||
|
||||
spin_unlock_irq(&pgdat->lru_lock);
|
||||
|
|
|
|||
Loading…
Reference in a new issue