Re: [patch v2] mm, vmscan: avoid thrashing anon lru when free + file is low

2017-06-04 Thread David Rientjes
On Fri, 2 Jun 2017, Andrew Morton wrote: > On Mon, 1 May 2017 14:34:21 -0700 (PDT) David Rientjes > wrote: > > > The purpose of the code that commit 623762517e23 ("revert 'mm: vmscan: do > > not swap anon pages just because free+file is low'") reintroduces is to > > prefer swapping anonymous me

Re: [patch v2] mm, vmscan: avoid thrashing anon lru when free + file is low

2017-06-02 Thread Andrew Morton
On Mon, 1 May 2017 14:34:21 -0700 (PDT) David Rientjes wrote: > The purpose of the code that commit 623762517e23 ("revert 'mm: vmscan: do > not swap anon pages just because free+file is low'") reintroduces is to > prefer swapping anonymous memory rather than trashing the file lru. > > If the an

Re: [patch v2] mm, vmscan: avoid thrashing anon lru when free + file is low

2017-05-31 Thread Michal Hocko
Andrew, it seems that this patch fallen through cracks. I am sorry if this was due to my review feedback because it turned out that I missed the point and later added my Acked-by. Sorry about that On Mon 01-05-17 14:34:21, David Rientjes wrote: > The purpose of the code that commit 623762517e23 ("

Re: [patch v2] mm, vmscan: avoid thrashing anon lru when free + file is low

2017-05-04 Thread Michal Hocko
On Wed 03-05-17 15:52:04, David Rientjes wrote: > On Wed, 3 May 2017, Michal Hocko wrote: [...] > > /* > > -* If there is enough inactive page cache, i.e. if the size of the > > -* inactive list is greater than that of the active list *and* the > > -* inactive list actually has some

Re: [patch v2] mm, vmscan: avoid thrashing anon lru when free + file is low

2017-05-03 Thread David Rientjes
On Wed, 3 May 2017, Michal Hocko wrote: > diff --git a/mm/vmscan.c b/mm/vmscan.c > index 24efcc20af91..f3ec8760dc06 100644 > --- a/mm/vmscan.c > +++ b/mm/vmscan.c > @@ -2113,16 +2113,14 @@ static void get_scan_count(struct lruvec *lruvec, > struct mem_cgroup *memcg, > u64 denominator = 0;

Re: [patch v2] mm, vmscan: avoid thrashing anon lru when free + file is low

2017-05-03 Thread Michal Hocko
On Wed 03-05-17 09:06:56, Michal Hocko wrote: [...] > This is still untested but should be much closer to what I've had in > mind. > --- > diff --git a/mm/vmscan.c b/mm/vmscan.c > index 24efcc20af91..bcdad30f942d 100644 > --- a/mm/vmscan.c > +++ b/mm/vmscan.c > @@ -2174,8 +2174,14 @@ static void ge

Re: [patch v2] mm, vmscan: avoid thrashing anon lru when free + file is low

2017-05-03 Thread Michal Hocko
On Wed 03-05-17 08:15:28, Michal Hocko wrote: > On Tue 02-05-17 13:41:23, David Rientjes wrote: > > On Tue, 2 May 2017, Michal Hocko wrote: [...] > > > I do agree that blindly > > > scanning anon pages when file pages are low is very suboptimal but this > > > adds yet another heuristic without _any

Re: [patch v2] mm, vmscan: avoid thrashing anon lru when free + file is low

2017-05-02 Thread Michal Hocko
On Tue 02-05-17 13:41:23, David Rientjes wrote: > On Tue, 2 May 2017, Michal Hocko wrote: > > > I have already asked and my questions were ignored. So let me ask again > > and hopefuly not get ignored this time. So Why do we need a different > > criterion on anon pages than file pages? > > The pr

Re: [patch v2] mm, vmscan: avoid thrashing anon lru when free + file is low

2017-05-02 Thread David Rientjes
On Tue, 2 May 2017, Michal Hocko wrote: > I have already asked and my questions were ignored. So let me ask again > and hopefuly not get ignored this time. So Why do we need a different > criterion on anon pages than file pages? The preference in get_scan_count() as already implemented is to recl

Re: [patch v2] mm, vmscan: avoid thrashing anon lru when free + file is low

2017-05-02 Thread Michal Hocko
On Mon 01-05-17 14:34:21, David Rientjes wrote: [...] > @@ -2204,8 +2204,17 @@ static void get_scan_count(struct lruvec *lruvec, > struct mem_cgroup *memcg, > } > > if (unlikely(pgdatfile + pgdatfree <= total_high_wmark)) { > - scan_balance = SCAN_

[patch v2] mm, vmscan: avoid thrashing anon lru when free + file is low

2017-05-01 Thread David Rientjes
The purpose of the code that commit 623762517e23 ("revert 'mm: vmscan: do not swap anon pages just because free+file is low'") reintroduces is to prefer swapping anonymous memory rather than trashing the file lru. If the anonymous inactive lru for the set of eligible zones is considered low, howev