From: David Howells <dhowells@redhat.com>
To: Matthew Wilcox <willy@infradead.org>,
Trond Myklebust <trond.myklebust@hammerspace.com>
Cc: dhowells@redhat.com, Christoph Hellwig <hch@lst.de>,
Andrew Morton <akpm@linux-foundation.org>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Christian Brauner <brauner@kernel.org>,
Jeff Layton <jlayton@kernel.org>,
linux-mm@kvack.org, linux-fsdevel@vger.kernel.org,
netfs@lists.linux.dev, v9fs@lists.linux.dev,
linux-afs@lists.infradead.org, ceph-devel@vger.kernel.org,
linux-cifs@vger.kernel.org, linux-nfs@vger.kernel.org,
devel@lists.orangefs.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] mm: Replace ->launder_folio() with flush and wait
Date: Thu, 07 Mar 2024 08:26:41 +0000 [thread overview]
Message-ID: <1821330.1709800001@warthog.procyon.org.uk> (raw)
In-Reply-To: <ZelGX3vVlGfEZm8H@casper.infradead.org>
Matthew Wilcox <willy@infradead.org> wrote:
> commit e3db7691e9f3dff3289f64e3d98583e28afe03db
> Author: Trond Myklebust <Trond.Myklebust@netapp.com>
> Date: Wed Jan 10 23:15:39 2007 -0800
>
> [PATCH] NFS: Fix race in nfs_release_page()
>...
> invalidate_inode_pages2() may find the dirty bit has been set on a page
> owing to the fact that the page may still be mapped after it was locked.
> Only after the call to unmap_mapping_range() are we sure that the page
> can no longer be dirtied.
Is that last sentence even true? It evicts folios from the TLB and/or
pagetables, but it doesn't actually trim any mmap made - in which case,
userspace is perfectly at liberty to regenerate and dirty the folio the moment
the folio is removed from the page tables. Otherwise DIO-to/from-mmap will
deadlock.
> but my belief is that we should be able to get rid of it.
I think you're probably correct. The best we can do, I think, is to preface
any call to invalidate_inode_pages2() with a flush-and-wait over the same
range.
David
next prev parent reply other threads:[~2024-03-07 8:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-06 22:39 [RFC PATCH] mm: Replace ->launder_folio() with flush and wait David Howells
2024-03-07 4:45 ` Matthew Wilcox
2024-03-07 8:26 ` David Howells [this message]
2024-03-07 10:36 ` David Howells
2024-03-07 14:54 ` Christoph Hellwig
2024-03-08 7:52 ` Miklos Szeredi
2024-03-19 14:14 ` David Howells
2024-03-19 16:13 ` Miklos Szeredi
2024-03-19 16:40 ` Miklos Szeredi
2024-03-19 16:59 ` Bernd Schubert
2024-03-07 16:15 ` [RFC PATCH v2] mm: Kill ->launder_folio() David Howells
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=1821330.1709800001@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=brauner@kernel.org \
--cc=ceph-devel@vger.kernel.org \
--cc=devel@lists.orangefs.org \
--cc=hch@lst.de \
--cc=jlayton@kernel.org \
--cc=linux-afs@lists.infradead.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-nfs@vger.kernel.org \
--cc=netfs@lists.linux.dev \
--cc=trond.myklebust@hammerspace.com \
--cc=v9fs@lists.linux.dev \
--cc=viro@zeniv.linux.org.uk \
--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;
as well as URLs for NNTP newsgroup(s).