From: Johannes Weiner <hannes@cmpxchg.org>
To: Suren Baghdasaryan <surenb@google.com>
Cc: Charan Teja Kalla <quic_charante@quicinc.com>,
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: Mon, 12 Jun 2023 09:40:28 -0400 [thread overview]
Message-ID: <ZIcgTEvxeAJ5SHuy@cmpxchg.org> (raw)
In-Reply-To: <CAJuCfpE42OJZur-1u2hvvXmPkRdV1uOfK-Aqm2POmvrDpRwg0Q@mail.gmail.com>
On Fri, Jun 09, 2023 at 04:13:14PM -0700, Suren Baghdasaryan wrote:
> On Fri, Jun 9, 2023 at 5:42 AM Charan Teja Kalla
> <quic_charante@quicinc.com> wrote:
> >
> > Thanks Suren & Johannes,
> >
> > On 6/7/2023 1:18 AM, Suren Baghdasaryan wrote:
> > > Hi Folks. Sorry for being late to the party.
> > > Yeah, userspace does not have a crystal ball to predict future user
> > > behavior, so there will always be pathological cases when usual
> > > assumptions and resulting madvise() would make things worse.
> > >
> > > I think this discussion can be split into several questions/issues:
> > > 1. Inconsistency in how madvise(MADV_PAGEOUT) would affect PSI
> > > calculation when the page is refaulted, based on the path it took
> > > before being evicted by madvise(). In your initial description case
> > > (a) is inconsistent with (b) and (c) and it's probably worth fixing.
> > > IMHO (a) should be made consistent with others, not the other way
> > > around. My reasoning is that page was expelled from the active list,
> > > so it was part of the active workingset.
> > >
> > That means we should be setting Workingset on the page while it is on
> > the active list and when it is being pageout through madvising. Right? I
> > see, this makes it consistent.
>
> This was my opinion but others might think otherwise, like I found out
> in some recent conversations. So, it would be great to get some more
> feedback before making the change.
I also agree with the consistency fix: it should set Workingset when
madvise zaps pages from the active list.
next prev parent reply other threads:[~2023-06-12 13:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-31 11:09 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 [this message]
2023-06-26 14:31 ` Charan Teja Kalla
2023-06-27 22:50 ` Suren Baghdasaryan
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=ZIcgTEvxeAJ5SHuy@cmpxchg.org \
--to=hannes@cmpxchg.org \
--cc=akpm@linux-foundation.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 \
--cc=surenb@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