From: Gregory Price <gourry@gourry.net>
To: "Huang, Ying" <ying.huang@intel.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
akpm@linux-foundation.org, david@redhat.com, nphamcs@gmail.com,
nehagholkar@meta.com, abhishekd@meta.com,
Johannes Weiner <hannes@cmpxchg.org>,
Feng Tang <feng.tang@intel.com>
Subject: Re: [PATCH 0/3] mm,TPP: Enable promotion of unmapped pagecache
Date: Fri, 8 Nov 2024 13:00:56 -0500 [thread overview]
Message-ID: <Zy5R2JvXvhFoJzeY@PC2K9PVX.TheFacebook.com> (raw)
In-Reply-To: <87jzdi782s.fsf@yhuang6-desk2.ccr.corp.intel.com>
On Tue, Nov 05, 2024 at 10:00:59AM +0800, Huang, Ying wrote:
> Hi, Gregory,
> >>
> >> Several years ago, we have tried to use the access time tracking
> >> mechanism of NUMA balancing to track the access time latency of unmapped
> >> file cache folios. The original implementation is as follows,
> >>
> >> https://git.kernel.org/pub/scm/linux/kernel/git/vishal/tiering.git/commit/?h=tiering-0.8&id=5f2e64ce75c0322602c2ec8c70b64bb69b1f1329
> >>
> >> What do you think about this?
> >>
> >
> > Coming back around to explore this topic a bit more, dug into this old
> > patch and the LRU patch by Keith - I'm struggling find a good option
> > that doesn't over-complicate or propose something contentious.
> >
> >
> > I did a browse through lore and did not see any discussion on this patch
> > or on Keith's LRU patch, so i presume discussion on this happened largely
> > off-list. So if you have any context as to why this wasn't RFC'd officially
> > I would like more information.
>
> Thanks for doing this. There's no much discussion offline. We just
> don't have enough time to work on the solution.
>
Exploring and testing this a little further, I brought this up to current
folio work in 6.9 and found this solution to be unstable as-is.
After some work to fix lock/reference issues, Johannes pointed out that
__filemap_get_folio can be called from an atomic context - which means it
may not be safe to do migrations in this context.
We're back to looking at something like an LRU-esque system, but now we're
thinking about isolating the folios in folio_mark_accessed into a task-local
list, and then process the list on resume.
Basically we're thinking
1) hook folio_mark_accessed and use PG_ACTIVE/PG_ACCESSED to determine whether
the page is a promotion candidate.
2) if it is, isolate it from the LRU - which is safe because folio_mark_accessed
already does this elsewhere, and place it onto current->promo_queue
3) set_notify_resume
4) add logic to resume_user_mode_work() to run through current->promo_queue and
either promote the pages accordingly, or do folio_putback_lru on failure.
Going to RFC this up
~Gregory
next prev parent reply other threads:[~2024-11-08 18:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240803094715.23900-1-gourry@gourry.net>
2024-08-08 23:20 ` Andrew Morton
2024-08-13 15:04 ` Gregory Price
2024-08-14 16:09 ` Gregory Price
2024-08-19 7:46 ` Huang, Ying
2024-08-19 15:15 ` Gregory Price
2024-09-02 6:53 ` Huang, Ying
2024-09-03 13:36 ` Gregory Price
2024-11-04 18:12 ` Gregory Price
2024-11-05 2:00 ` Huang, Ying
2024-11-05 15:16 ` Gregory Price
2024-11-08 18:00 ` Gregory Price [this message]
2024-11-11 1:35 ` Huang, Ying
2024-11-11 14:25 ` Gregory Price
2024-11-12 0:33 ` Huang, Ying
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=Zy5R2JvXvhFoJzeY@PC2K9PVX.TheFacebook.com \
--to=gourry@gourry.net \
--cc=abhishekd@meta.com \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=feng.tang@intel.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nehagholkar@meta.com \
--cc=nphamcs@gmail.com \
--cc=ying.huang@intel.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