mm/vmscan: don't disable irq again when count pgrefill for memcg
Subsystems (3)
PATCH 1/1 mm/vmscan: don't disable irq again when count pgrefill for memcg
We can use __count_memcg_events directly because this callsite is alreay protected by spin_lock_irq.
Signed-off-by Yafang Shao <[email protected]>
--- mm/vmscan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/vmscan.c +1 -1
@@ -2035,7 +2035,7 @@ static void shrink_active_list(unsigned long nr_to_scan, reclaim_stat->recent_scanned[file] += nr_taken;__count_vm_events (PGREFILL , nr_scanned); -count_memcg_events (lruvec_memcg (lruvec),PGREFILL , nr_scanned); +__count_memcg_events (lruvec_memcg (lruvec),PGREFILL , nr_scanned);spin_unlock_irq (&pgdat->lru_lock);
Signature · 1 line
1.8.3.1
Quoted 4 lines · Yafang Shao
We can use
__count_memcg_eventsdirectly because this callsite is alreay protected byspin_lock_irq.Signed-off-by Yafang Shao <[email protected]>
Acked-by Michal Hocko <[email protected]>
Thanks!
Quoted 20 lines
--- mm/vmscan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)mm/vmscan.c +1
-1@@ -2035,7 +2035,7 @@ static void shrink_active_list(unsigned long nr_to_scan, reclaim_stat->recent_scanned[file] += nr_taken;__count_vm_events (PGREFILL , nr_scanned); -count_memcg_events (lruvec_memcg (lruvec),PGREFILL , nr_scanned); +__count_memcg_events (lruvec_memcg (lruvec),PGREFILL , nr_scanned);spin_unlock_irq (&pgdat->lru_lock);Signature · 1 line
1.8.3.1
Signature · 2 lines
Michal Hocko SUSE Labs