From: Suren Baghdasaryan <surenb@google.com>
To: Charan Teja Kalla <quic_charante@quicinc.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>,
akpm@linux-foundation.org, minchan@kernel.org,
quic_pkondeti@quicinc.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: madvise: fix uneven accounting of psi
Date: Tue, 27 Jun 2023 15:50:59 -0700 [thread overview]
Message-ID: <CAJuCfpHgC2=BebzdwcH3-bUR2VQ8=hti2d7YNwF_6ij-JLyOHw@mail.gmail.com> (raw)
In-Reply-To: <70743150-dc85-1a1a-87ec-e3dd9f72c5d0@quicinc.com>
On Mon, Jun 26, 2023 at 7:31 AM Charan Teja Kalla
<quic_charante@quicinc.com> wrote:
>
> Hi Suren,
>
> On 6/10/2023 4:43 AM, Suren Baghdasaryan wrote:
> >>> I can see use for that from userspace to detect incorrect madvise()
> >>> and adjust its aggressiveness. I think the API might get a bit complex
> >>> because of the need to associate refaults with specific madvise()/VMAs
> >>> to understand which hint was incorrect and adjust the behavior.
> >>> Instead what is the opinion about giving an MADV_PAGEOUT_INACTIVE
> >> interface which does operate on a page only If it is on the inactive
> >> list and !PageWorkingset ?
> > IOW you want a less aggressive mechanism which can be used by the
> > userspace to tell the kernel "I think these pages won't be used but
> > I'm not 100% sure, so drop them only if they are inactive"?
> > I don't know how much that will help when the madvise() ends up being
> > wrong but maybe you can quickly experiment and tell us if the
> > difference is substantial?
>
> We did some extensive testing on Android and this ask is not helping us
> much. I am really not sure if there is some other usecase that can
> benefit from this. So, for now I just stick to your suggestion of making
> the pages on the Active list as the Workingset at the time of pageout.
> >
Thanks for checking that. Your plan SGTM.
>
> Thanks.
>
next prev parent reply other threads:[~2023-06-27 22:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-31 11:09 [PATCH] mm: madvise: fix uneven accounting of psi Charan Teja Kalla
[not found] ` <20230531221955.GD102494@cmpxchg.org>
[not found] ` <230e45e8-8cd8-3668-bbfa-a95212b4cb99@quicinc.com>
[not found] ` <20230605180013.GD221380@cmpxchg.org>
[not found] ` <f3f15b6a-8618-f755-f21c-4193c502e65c@quicinc.com>
2023-06-06 19:48 ` Suren Baghdasaryan
2023-06-09 12:42 ` Charan Teja Kalla
2023-06-09 23:13 ` Suren Baghdasaryan
2023-06-12 13:40 ` Johannes Weiner
2023-06-26 14:31 ` Charan Teja Kalla
2023-06-27 22:50 ` Suren Baghdasaryan [this message]
2023-06-13 3:13 ` Pavan Kondeti
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='CAJuCfpHgC2=BebzdwcH3-bUR2VQ8=hti2d7YNwF_6ij-JLyOHw@mail.gmail.com' \
--to=surenb@google.com \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan@kernel.org \
--cc=quic_charante@quicinc.com \
--cc=quic_pkondeti@quicinc.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;
as well as URLs for NNTP newsgroup(s).