Skip to contentSkip to conversation

mm/vmscan: don't disable irq again when count pgrefill for memcg

PATCH In review Yafang Shao 2 participants 2 messages Apr 24, 2019 – Apr 25, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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.

---
 mm/vmscan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/vmscan.c +1 -1
index 347c9b3..18d48e6 100644
@@ -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
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Yafang Shao

We can use __count_memcg_events directly because this callsite is alreay protected by spin_lock_irq.

Thanks!

Quoted 20 lines
---
 mm/vmscan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/vmscan.c +1 -1
index 347c9b3..18d48e6 100644
@@ -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