From: Johannes Weiner <hannes@cmpxchg.org>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
Matthew Wilcox <willy@infradead.org>,
linux-mm <linux-mm@kvack.org>,
linux-fsdevel@vger.kernel.org,
Thomas Lindroth <thomas.lindroth@gmail.com>
Subject: Re: Possible bogus "fuse: trying to steal weird page" warning related to PG_workingset.
Date: Fri, 18 Jun 2021 13:29:44 -0400 [thread overview]
Message-ID: <YMzYCCBaUTfzdFff@cmpxchg.org> (raw)
In-Reply-To: <029095d9-399a-e323-15f3-b665e9852eb3@suse.cz>
On Wed, Jun 16, 2021 at 06:48:34PM +0200, Vlastimil Babka wrote:
> On 6/16/21 3:47 PM, Miklos Szeredi wrote:
> > On Wed, 16 Jun 2021 at 14:59, Matthew Wilcox <willy@infradead.org> wrote:
> >>
> >> > AFAICT fuse is trying to steal a pagecache page from a pipe buffer
> >> > created by splice(2). The page looks okay, but I have no idea what
> >> > PG_workingset means in this context.
> >> >
> >> > Matthew, can you please help?
> >>
> >> PG_workingset was introduced by Johannes:
> >>
> >> mm: workingset: tell cache transitions from workingset thrashing
> >>
> >> Refaults happen during transitions between workingsets as well as in-place
> >> thrashing. Knowing the difference between the two has a range of
> >> applications, including measuring the impact of memory shortage on the
> >> system performance, as well as the ability to smarter balance pressure
> >> between the filesystem cache and the swap-backed workingset.
> >>
> >> During workingset transitions, inactive cache refaults and pushes out
> >> established active cache. When that active cache isn't stale, however,
> >> and also ends up refaulting, that's bonafide thrashing.
> >>
> >> Introduce a new page flag that tells on eviction whether the page has been
> >> active or not in its lifetime. This bit is then stored in the shadow
> >> entry, to classify refaults as transitioning or thrashing.
> >>
> >> so I think it's fine for you to ignore when stealing a page.
> >
> > I have problem understanding what a workingset is. Is it related to
>
> "working set" is the notion of the set of pages that the workload needs to
> access at the moment/relatively short time window, and it would be beneficial if
> all of it could fit in the RAM.
> PG_workinsgset is part of the mechanism that tries to estimate this ideal set of
> pages, and especially when the workload shifts to another set of pages, in order
> to guide reclaim better. See the big comment at the top of mm/workingset.c for
> details
>
> > swap? If so, how can such a page be part of a file mapping?
>
> Not related to swap. It was actually first implemented only for file pages (page
> cache), but then extended to anonymous pages by aae466b0052e ("mm/swap:
> implement workingset detection for anonymous LRU")
Thanks, yes.
Think of it as similar to PG_active. It's just another usage/heat
indicator of file and anon pages on the reclaim LRU that, unlike
PG_active, persists across deactivation and even reclaim (we store it
in the page cache / swapper cache tree until the page refaults).
So if fuse accepts pages that can legally have PG_active set,
PG_workingset is fine too.
next prev parent reply other threads:[~2021-06-18 17:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <016b2fe2-0d52-95c9-c519-40b14480587a@gmail.com>
2021-06-16 12:31 ` Miklos Szeredi
2021-06-16 12:59 ` Matthew Wilcox
2021-06-16 13:47 ` Miklos Szeredi
2021-06-16 16:48 ` Vlastimil Babka
2021-06-18 17:29 ` Johannes Weiner [this message]
2021-06-18 19:18 ` Miklos Szeredi
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=YMzYCCBaUTfzdFff@cmpxchg.org \
--to=hannes@cmpxchg.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=miklos@szeredi.hu \
--cc=thomas.lindroth@gmail.com \
--cc=vbabka@suse.cz \
--cc=willy@infradead.org \
/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