LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] mm: Fix recent_rotated history
@ 2019-05-28 16:09 Kirill Tkhai
  2019-05-29  8:30 ` Kirill Tkhai
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Kirill Tkhai @ 2019-05-28 16:09 UTC (permalink / raw)
  To: akpm, daniel.m.jordan, mhocko, linux-mm, linux-kernel, ktkhai

Johannes pointed that after commit 886cf1901db9
we lost all zone_reclaim_stat::recent_rotated
history. This commit fixes that.

Fixes: 886cf1901db9 "mm: move recent_rotated pages calculation to shrink_inactive_list()"
Reported-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 mm/vmscan.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index d9c3e873eca6..1d49329a4d7d 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1953,8 +1953,8 @@ shrink_inactive_list(unsigned long nr_to_scan, struct lruvec *lruvec,
 	if (global_reclaim(sc))
 		__count_vm_events(item, nr_reclaimed);
 	__count_memcg_events(lruvec_memcg(lruvec), item, nr_reclaimed);
-	reclaim_stat->recent_rotated[0] = stat.nr_activate[0];
-	reclaim_stat->recent_rotated[1] = stat.nr_activate[1];
+	reclaim_stat->recent_rotated[0] += stat.nr_activate[0];
+	reclaim_stat->recent_rotated[1] += stat.nr_activate[1];
 
 	move_pages_to_lru(lruvec, &page_list);
 


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

* Re: [PATCH] mm: Fix recent_rotated history
  2019-05-28 16:09 [PATCH] mm: Fix recent_rotated history Kirill Tkhai
@ 2019-05-29  8:30 ` Kirill Tkhai
  2019-05-29 14:01   ` Daniel Jordan
  2019-05-29 15:38 ` Michal Hocko
  2019-05-29 15:44 ` Johannes Weiner
  2 siblings, 1 reply; 5+ messages in thread
From: Kirill Tkhai @ 2019-05-29  8:30 UTC (permalink / raw)
  To: akpm, daniel.m.jordan, mhocko, hannes, linux-mm, linux-kernel

Missed Johannes :(

CC

On 28.05.2019 19:09, Kirill Tkhai wrote:
> Johannes pointed that after commit 886cf1901db9
> we lost all zone_reclaim_stat::recent_rotated
> history. This commit fixes that.
> 
> Fixes: 886cf1901db9 "mm: move recent_rotated pages calculation to shrink_inactive_list()"
> Reported-by: Johannes Weiner <hannes@cmpxchg.org>
> Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
> ---
>  mm/vmscan.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index d9c3e873eca6..1d49329a4d7d 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -1953,8 +1953,8 @@ shrink_inactive_list(unsigned long nr_to_scan, struct lruvec *lruvec,
>  	if (global_reclaim(sc))
>  		__count_vm_events(item, nr_reclaimed);
>  	__count_memcg_events(lruvec_memcg(lruvec), item, nr_reclaimed);
> -	reclaim_stat->recent_rotated[0] = stat.nr_activate[0];
> -	reclaim_stat->recent_rotated[1] = stat.nr_activate[1];
> +	reclaim_stat->recent_rotated[0] += stat.nr_activate[0];
> +	reclaim_stat->recent_rotated[1] += stat.nr_activate[1];
>  
>  	move_pages_to_lru(lruvec, &page_list);
>  
> 


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

* Re: [PATCH] mm: Fix recent_rotated history
  2019-05-29  8:30 ` Kirill Tkhai
@ 2019-05-29 14:01   ` Daniel Jordan
  0 siblings, 0 replies; 5+ messages in thread
From: Daniel Jordan @ 2019-05-29 14:01 UTC (permalink / raw)
  To: Kirill Tkhai
  Cc: akpm, daniel.m.jordan, mhocko, hannes, linux-mm, linux-kernel

On Wed, May 29, 2019 at 11:30:09AM +0300, Kirill Tkhai wrote:
> Missed Johannes :(
> 
> CC
> 
> On 28.05.2019 19:09, Kirill Tkhai wrote:
> > Johannes pointed that after commit 886cf1901db9
> > we lost all zone_reclaim_stat::recent_rotated
> > history. This commit fixes that.

Ugh, good catch.

I took another pass through this series but didn't notice anything else.

> > 
> > Fixes: 886cf1901db9 "mm: move recent_rotated pages calculation to shrink_inactive_list()"
> > Reported-by: Johannes Weiner <hannes@cmpxchg.org>
> > Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
> > ---
> >  mm/vmscan.c |    4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/mm/vmscan.c b/mm/vmscan.c
> > index d9c3e873eca6..1d49329a4d7d 100644
> > --- a/mm/vmscan.c
> > +++ b/mm/vmscan.c
> > @@ -1953,8 +1953,8 @@ shrink_inactive_list(unsigned long nr_to_scan, struct lruvec *lruvec,
> >  	if (global_reclaim(sc))
> >  		__count_vm_events(item, nr_reclaimed);
> >  	__count_memcg_events(lruvec_memcg(lruvec), item, nr_reclaimed);
> > -	reclaim_stat->recent_rotated[0] = stat.nr_activate[0];
> > -	reclaim_stat->recent_rotated[1] = stat.nr_activate[1];
> > +	reclaim_stat->recent_rotated[0] += stat.nr_activate[0];
> > +	reclaim_stat->recent_rotated[1] += stat.nr_activate[1];
> >  
> >  	move_pages_to_lru(lruvec, &page_list);
> >  
> > 
> 

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

* Re: [PATCH] mm: Fix recent_rotated history
  2019-05-28 16:09 [PATCH] mm: Fix recent_rotated history Kirill Tkhai
  2019-05-29  8:30 ` Kirill Tkhai
@ 2019-05-29 15:38 ` Michal Hocko
  2019-05-29 15:44 ` Johannes Weiner
  2 siblings, 0 replies; 5+ messages in thread
From: Michal Hocko @ 2019-05-29 15:38 UTC (permalink / raw)
  To: Kirill Tkhai; +Cc: akpm, daniel.m.jordan, linux-mm, linux-kernel

On Tue 28-05-19 19:09:02, Kirill Tkhai wrote:
> Johannes pointed that after commit 886cf1901db9
> we lost all zone_reclaim_stat::recent_rotated
> history. This commit fixes that.
> 
> Fixes: 886cf1901db9 "mm: move recent_rotated pages calculation to shrink_inactive_list()"
> Reported-by: Johannes Weiner <hannes@cmpxchg.org>
> Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>

I didn't get to review the original bug series but this one looks
obviously correct.

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

> ---
>  mm/vmscan.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index d9c3e873eca6..1d49329a4d7d 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -1953,8 +1953,8 @@ shrink_inactive_list(unsigned long nr_to_scan, struct lruvec *lruvec,
>  	if (global_reclaim(sc))
>  		__count_vm_events(item, nr_reclaimed);
>  	__count_memcg_events(lruvec_memcg(lruvec), item, nr_reclaimed);
> -	reclaim_stat->recent_rotated[0] = stat.nr_activate[0];
> -	reclaim_stat->recent_rotated[1] = stat.nr_activate[1];
> +	reclaim_stat->recent_rotated[0] += stat.nr_activate[0];
> +	reclaim_stat->recent_rotated[1] += stat.nr_activate[1];
>  
>  	move_pages_to_lru(lruvec, &page_list);
>  
> 

-- 
Michal Hocko
SUSE Labs

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

* Re: [PATCH] mm: Fix recent_rotated history
  2019-05-28 16:09 [PATCH] mm: Fix recent_rotated history Kirill Tkhai
  2019-05-29  8:30 ` Kirill Tkhai
  2019-05-29 15:38 ` Michal Hocko
@ 2019-05-29 15:44 ` Johannes Weiner
  2 siblings, 0 replies; 5+ messages in thread
From: Johannes Weiner @ 2019-05-29 15:44 UTC (permalink / raw)
  To: Kirill Tkhai; +Cc: akpm, daniel.m.jordan, mhocko, linux-mm, linux-kernel

On Tue, May 28, 2019 at 07:09:02PM +0300, Kirill Tkhai wrote:
> Johannes pointed that after commit 886cf1901db9
> we lost all zone_reclaim_stat::recent_rotated
> history. This commit fixes that.
> 
> Fixes: 886cf1901db9 "mm: move recent_rotated pages calculation to shrink_inactive_list()"
> Reported-by: Johannes Weiner <hannes@cmpxchg.org>
> Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>

Acked-by: Johannes Weiner <hannes@cmpxchg.org>

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

end of thread, other threads:[~2019-05-29 15:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-28 16:09 [PATCH] mm: Fix recent_rotated history Kirill Tkhai
2019-05-29  8:30 ` Kirill Tkhai
2019-05-29 14:01   ` Daniel Jordan
2019-05-29 15:38 ` Michal Hocko
2019-05-29 15:44 ` Johannes Weiner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).