[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJuCfpHgC2=BebzdwcH3-bUR2VQ8=hti2d7YNwF_6ij-JLyOHw@mail.gmail.com>
Date: Tue, 27 Jun 2023 15:50:59 -0700
From: Suren Baghdasaryan <surenb@...gle.com>
To: Charan Teja Kalla <quic_charante@...cinc.com>
Cc: Johannes Weiner <hannes@...xchg.org>, akpm@...ux-foundation.org,
minchan@...nel.org, quic_pkondeti@...cinc.com, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: madvise: fix uneven accounting of psi
On Mon, Jun 26, 2023 at 7:31 AM Charan Teja Kalla
<quic_charante@...cinc.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.
>
Powered by blists - more mailing lists