linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/vmscan: don't disable irq again when count pgrefill for memcg
@ 2019-04-24  8:11 Yafang Shao
  2019-04-25  6:30 ` Michal Hocko
  0 siblings, 1 reply; 2+ messages in thread
From: Yafang Shao @ 2019-04-24  8:11 UTC (permalink / raw)
  To: mhocko; +Cc: akpm, linux-mm, shaoyafang, Yafang Shao

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

Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
---
 mm/vmscan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 347c9b3..18d48e6 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -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);
 
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] mm/vmscan: don't disable irq again when count pgrefill for memcg
  2019-04-24  8:11 [PATCH] mm/vmscan: don't disable irq again when count pgrefill for memcg Yafang Shao
@ 2019-04-25  6:30 ` Michal Hocko
  0 siblings, 0 replies; 2+ messages in thread
From: Michal Hocko @ 2019-04-25  6:30 UTC (permalink / raw)
  To: Yafang Shao; +Cc: akpm, linux-mm, shaoyafang

On Wed 24-04-19 16:11:34, Yafang Shao wrote:
> We can use __count_memcg_events directly because this callsite is alreay
> protected by spin_lock_irq.
> 
> Signed-off-by: Yafang Shao <laoar.shao@gmail.com>

Acked-by: Michal Hocko <mhocko@suse.com>

Thanks!

> ---
>  mm/vmscan.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index 347c9b3..18d48e6 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -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);
>  
> -- 
> 1.8.3.1
> 

-- 
Michal Hocko
SUSE Labs


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-04-25  8:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-24  8:11 [PATCH] mm/vmscan: don't disable irq again when count pgrefill for memcg Yafang Shao
2019-04-25  6:30 ` Michal Hocko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox