Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: linux-mm@kvack.org
Cc: linux-fsdevel@vger.kernel.org, Josef Bacik <josef@toxicpanda.com>
Subject: Re: [RFC PATCH] filemap: Remove file pinning during fault handling
Date: Mon, 22 Jun 2026 20:34:19 +0100	[thread overview]
Message-ID: <ajmOO0v2ndBFLaSU@casper.infradead.org> (raw)
In-Reply-To: <20260622192114.1147198-1-willy@infradead.org>

On Mon, Jun 22, 2026 at 08:21:12PM +0100, Matthew Wilcox (Oracle) wrote:
>  		if (!(vmf->flags & FAULT_FLAG_TRIED))
> -			fpin = do_async_mmap_readahead(vmf, folio);
> +			do_async_mmap_readahead(vmf, folio);
>  		if (unlikely(!folio_test_uptodate(folio))) {
>  			filemap_invalidate_lock_shared(mapping);
>  			mapping_locked = true;
>  		}
> +
> +		if (!folio_trylock(folio)) {
> +			if (vmf->flags & FAULT_FLAG_KILLABLE) {
> +				if (__folio_lock_killable(folio) < 0)
> +					return VM_FAULT_SIGBUS;

... clearly didn't hit this case during my testing.  It returns with
the invalidate lock held.  I'll fix this for a v2.



  reply	other threads:[~2026-06-22 19:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-22 19:21 [RFC PATCH] filemap: Remove file pinning during fault handling Matthew Wilcox (Oracle)
2026-06-22 19:34 ` Matthew Wilcox [this message]
2026-06-24  5:52 ` Barry Song (Xiaomi)
2026-06-24  6:58 ` Barry Song

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=ajmOO0v2ndBFLaSU@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=josef@toxicpanda.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.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