Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1625092

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

From Michal Hocko <mhocko@kernel.org>
Newsgroups linux.kernel
Subject Re: [patch] mm, vmscan: avoid thrashing anon lru when free + file is low
Date 2017-04-18 09:20 +0200
Message-ID <txvAB-3i3-5@gated-at.bofh.it> (permalink)
References <txoSu-7uv-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon 17-04-17 17:06:20, 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 all anonymous memory is unevictable, however, this insistance on
> SCAN_ANON ends up thrashing that lru instead.

Why would be the anonymous memory unevictable? If the swap is depleted
then we enforce file scanning AFAIR. Are those pages pinned somehow, by
who? It would be great if you could describe the workload which triggers
a problem which you are trying to fix.

> Check that enough evictable anon memory is actually on this lruvec before
> insisting on SCAN_ANON.  SWAP_CLUSTER_MAX is used as the threshold to
> determine if only scanning anon is beneficial.
>
> Otherwise, fallback to balanced reclaim so the file lru doesn't remain
> untouched.

Why should we treat anonymous and file pages any different here. In
other words why should file pages check for high wmark and anonymous for
SWAP_CLUSTER_MAX.

[...]
-- 
Michal Hocko
SUSE Labs

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


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