From: Charan Teja Kalla <quic_charante@quicinc.com>
To: Pavan Kondeti <quic_pkondeti@quicinc.com>
Cc: <akpm@linux-foundation.org>, <surenb@google.com>,
<hannes@cmpxchg.org>, <minchan@kernel.org>,
<quic_smanapra@quicinc.com>, <linux-mm@kvack.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH V2] mm: madvise: fix uneven accounting of psi
Date: Fri, 30 Jun 2023 18:46:02 +0530 [thread overview]
Message-ID: <ad41ccc3-fd9a-bca3-4910-751b72c831fe@quicinc.com> (raw)
In-Reply-To: <65ce241e-8614-b669-cd20-b315c30bd794@quicinc.com>
Hi Pavan,
On 6/28/2023 4:19 PM, Charan Teja Kalla wrote:
> I think marking the folio as a workingset when it sits on the active is
> not a correct thing. For the same example you mentioned, a simple CMA
> allocation will be dropping the clean pages instead of migration. PSI
> accounting on refault of those pages don't reveal anything to the user.
>
> Where as in the madvise() cases, this PSI tells the user about the type
> of pages that he is working on.[1]
>
> BTW, damon_pa_pageout() seems a valid case above. let me fix it in the
> next patch.
I did look a little bit more at the damon code and IIUC it: DAMON
monitors the ranges it is asked to operate as regions and
operate(reclaim) on the region that has less number of accesses, IOW,
damon won't do pageout operation on a folio if it is really under use,
CMIW.
This is unlike the case with the madvise() operation where Workingset
helps in accounting PSI that helps user the type of folios he is
operating on.
Assume that damon is operating on wrong set of regions and Workingset
helps in giving a PSI. This got no help to user and just telling the
internals of damon. No?
Having said that, theoretically it seems correct to me to set workingset
on folios as they leave the active list, but I don't have any strong
reason to say what happens if we won't.
Moreover, this patch is mostly talks about the madvise() operated folios
not inline with the usual reclaim. May be a separate change can be
raised for damon() operated folios once we agree upon the importance of
Workingset to these folios. WDYT?
Thanks,
next prev parent reply other threads:[~2023-06-30 13:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-27 10:33 Charan Teja Kalla
2023-06-27 13:56 ` Pavan Kondeti
2023-06-28 10:49 ` Charan Teja Kalla
2023-06-29 5:07 ` Pavan Kondeti
2023-06-30 13:16 ` Charan Teja Kalla [this message]
2023-06-27 14:46 ` Johannes Weiner
2023-06-28 10:50 ` Charan Teja Kalla
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=ad41ccc3-fd9a-bca3-4910-751b72c831fe@quicinc.com \
--to=quic_charante@quicinc.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_pkondeti@quicinc.com \
--cc=quic_smanapra@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
all inboxes | Powered by JetHome®