Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1627012
| From | Minchan Kim <minchan@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [patch] mm, vmscan: avoid thrashing anon lru when free + file is low |
| Date | 2017-04-20 08:10 +0200 |
| Message-ID | <tydrX-5iV-3@gated-at.bofh.it> (permalink) |
| References | <txoSu-7uv-7@gated-at.bofh.it> <txqhz-8es-3@gated-at.bofh.it> <txJ0S-2KJ-15@gated-at.bofh.it> <txLvH-4wZ-11@gated-at.bofh.it> <ty7cR-1dY-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi David,
On Wed, Apr 19, 2017 at 04:24:48PM -0700, David Rientjes wrote:
> On Wed, 19 Apr 2017, Minchan Kim wrote:
>
> > diff --git a/mm/vmscan.c b/mm/vmscan.c
> > index 24efcc20af91..5d2f3fa41e92 100644
> > --- a/mm/vmscan.c
> > +++ b/mm/vmscan.c
> > @@ -2174,8 +2174,17 @@ static void get_scan_count(struct lruvec *lruvec, struct mem_cgroup *memcg,
> > }
> >
> > if (unlikely(pgdatfile + pgdatfree <= total_high_wmark)) {
> > - scan_balance = SCAN_ANON;
> > - goto out;
> > + /*
> > + * force SCAN_ANON if inactive anonymous LRU lists of
> > + * eligible zones are enough pages. Otherwise, thrashing
> > + * can be happen on the small anonymous LRU list.
> > + */
> > + if (!inactive_list_is_low(lruvec, false, NULL, sc, false) &&
> > + lruvec_lru_size(lruvec, LRU_INACTIVE_ANON, sc->reclaim_idx)
> > + >> sc->priority) {
> > + scan_balance = SCAN_ANON;
> > + goto out;
> > + }
> > }
> > }
> >
>
> Hi Minchan,
>
> This looks good and it correctly biases against SCAN_ANON for my workload
> that was thrashing the anon lrus. Feel free to use parts of my changelog
> if you'd like.
Thanks for the testing!
As considering how it's hard to find such a problem, it should be totally your
credit. So you can send the patch with detailed description. Feel free to
add my suggested-by. :)
Thanks!
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[patch] mm, vmscan: avoid thrashing anon lru when free + file is low David Rientjes <rientjes@google.com> - 2017-04-18 02:10 +0200
Re: [patch] mm, vmscan: avoid thrashing anon lru when free + file is low Minchan Kim <minchan@kernel.org> - 2017-04-18 03:40 +0200
Re: [patch] mm, vmscan: avoid thrashing anon lru when free + file is low David Rientjes <rientjes@google.com> - 2017-04-18 23:40 +0200
Re: [patch] mm, vmscan: avoid thrashing anon lru when free + file is low Minchan Kim <minchan@kernel.org> - 2017-04-19 02:20 +0200
Re: [patch] mm, vmscan: avoid thrashing anon lru when free + file is low David Rientjes <rientjes@google.com> - 2017-04-20 01:30 +0200
Re: [patch] mm, vmscan: avoid thrashing anon lru when free + file is low Minchan Kim <minchan@kernel.org> - 2017-04-20 08:10 +0200
Re: [patch] mm, vmscan: avoid thrashing anon lru when free + file is low Michal Hocko <mhocko@kernel.org> - 2017-04-19 09:10 +0200
Re: [patch] mm, vmscan: avoid thrashing anon lru when free + file is low Michal Hocko <mhocko@kernel.org> - 2017-04-18 09:20 +0200
csiph-web