linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Yu Zhao <yuzhao@google.com>
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: Mon, 8 Jul 2024 23:36:49 +0100	[thread overview]
Message-ID: <ZoxqAW5_GjbesrW5@casper.infradead.org> (raw)
In-Reply-To: <20240708212753.3120511-1-yuzhao@google.com>

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().

> @@ -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.



  parent reply	other threads:[~2024-07-08 22:36 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 [this message]
2024-07-09 22:30   ` Yu Zhao

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=ZoxqAW5_GjbesrW5@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=bharata@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=yuzhao@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