From: Nico Pache <npache@redhat.com>
To: Shakeel Butt <shakeelb@google.com>, Johannes Weiner <hannes@cmpxchg.org>
Cc: Linux MM <linux-mm@kvack.org>,
Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>,
Rafael Aquini <aquini@redhat.com>, Waiman Long <llong@redhat.com>,
Michal Hocko <mhocko@suse.com>,
hakavlad@inbox.lv
Subject: Re: [PATCH v3] vm_swappiness=0 should still try to avoid swapping anon memory
Date: Tue, 10 Aug 2021 18:16:33 -0400 [thread overview]
Message-ID: <cbdbeae9-010e-ca11-eeab-44fa7d78c83a@redhat.com> (raw)
In-Reply-To: <CALvZod5L+cyON5qRX3eSdHbo+-H7VDQeFuYYNqpK5diCcv9OMw@mail.gmail.com>
On 8/10/21 5:17 PM, Shakeel Butt wrote:
> On Tue, Aug 10, 2021 at 12:24 PM Nico Pache <npache@redhat.com> wrote:
>>
>>
> [...]
>>>
>>> I'm wondering how you're getting anon scans with swappiness=0. If you
>>> look at get_scan_count(), SCAN_FRACT with swappines=0 should always
>>> result in ap = fraction[0] = 0, which never yields any anon scan
>>> targets. So I'm thinking you're running into sc->file_is_tiny
>>> situations, meaning remaining file pages alone are not enough to
>>> restore watermarks anymore. Is that possible?
>>
>> Yes DEACTIVATE_ANON is enabling the file_is_tiny case in shrink_node(). That is what im trying to prevent in the swappiness=0 case.
>>
>
> Can you please explain how DEACTIVATE_ANON is enabling the file_is_tiny case?
You're right. Just did a second pass... I misinterpreted the assignment to
file_is_tiny. This is not the case that is causing the issue. So back to the
SCAN_FRACT case. From my testing the refaulting still seems to be causing the
issue; however, to your point in earlier discussions, if swappiness=0 then the
get_scan_count *should* be 0.
So my patch does solve the issue by preventing the shrink_list from deactivating
the anon, but it may be hiding some other issue that is the ultimate cause.
Thanks for pointing that out!
-- Nico
next prev parent reply other threads:[~2021-08-10 22:28 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-09 22:37 Nico Pache
2021-08-10 15:27 ` Johannes Weiner
2021-08-10 19:24 ` Nico Pache
2021-08-10 21:17 ` Shakeel Butt
2021-08-10 22:16 ` Nico Pache [this message]
2021-08-10 22:29 ` Shakeel Butt
2021-08-10 21:16 ` Shakeel Butt
2021-08-10 15:37 ` Waiman Long
2022-04-19 18:11 ` Nico Pache
2022-04-19 18:46 ` Johannes Weiner
2022-04-19 19:37 ` Nico Pache
2022-04-19 23:54 ` Nico Pache
2022-04-20 14:01 ` Johannes Weiner
2022-04-20 17:34 ` Nico Pache
2022-04-20 18:44 ` Johannes Weiner
2022-04-21 16:21 ` Nico Pache
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cbdbeae9-010e-ca11-eeab-44fa7d78c83a@redhat.com \
--to=npache@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=aquini@redhat.com \
--cc=hakavlad@inbox.lv \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=llong@redhat.com \
--cc=mhocko@suse.com \
--cc=shakeelb@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox