From: Yu Zhao <yuzhao@google.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Bharata B Rao <bharata@amd.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH mm-unstable v1] mm/truncate: batch-clear shadow entries
Date: Tue, 9 Jul 2024 16:30:06 -0600 [thread overview]
Message-ID: <CAOUHufYnLeggF+34-L_Yn-UUyRb+ZnTzmByy-wL-3xrfdrycEw@mail.gmail.com> (raw)
In-Reply-To: <ZoxqAW5_GjbesrW5@casper.infradead.org>
On Mon, Jul 8, 2024 at 4:36 PM Matthew Wilcox <willy@infradead.org> wrote:
>
> On Mon, Jul 08, 2024 at 03:27:53PM -0600, Yu Zhao wrote:
> > Make clear_shadow_entry() clear shadow entries in `struct folio_batch`
> > so that it can reduce contention on i_lock and i_pages locks, e.g.,
>
> I think it needs to be renamed, perhaps to clear_shadow_entries().
Yes, thank you.
> > @@ -503,8 +486,8 @@ unsigned long mapping_try_invalidate(struct address_space *mapping,
> > /* We rely upon deletion not changing folio->index */
> >
> > if (xa_is_value(folio)) {
> > - count += invalidate_exceptional_entry(mapping,
> > - indices[i], folio);
> > + xa_has_values = true;
> > + count++;
>
> Mmm. This is awkward. It's supposed to return the number of pages,
> not the number of folios (or shadow entries) invalidated.
I didn't think about this much. It seems to me no callers really care
about it other than some debugging messages?
prev parent reply other threads:[~2024-07-09 22:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-08 21:27 Yu Zhao
2024-07-08 22:16 ` Andrew Morton
2024-07-09 22:27 ` Yu Zhao
2024-07-08 22:36 ` Matthew Wilcox
2024-07-09 22:30 ` Yu Zhao [this message]
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=CAOUHufYnLeggF+34-L_Yn-UUyRb+ZnTzmByy-wL-3xrfdrycEw@mail.gmail.com \
--to=yuzhao@google.com \
--cc=akpm@linux-foundation.org \
--cc=bharata@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--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