[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wj2MFUfh0juVEeBkZ6hBjp=X_UC3jR5edmZ08mV5bztyg@mail.gmail.com>
Date: Sat, 29 Oct 2022 13:30:26 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: John Hubbard <jhubbard@...dia.com>
Cc: Nadav Amit <nadav.amit@...il.com>,
Peter Zijlstra <peterz@...radead.org>,
Jann Horn <jannh@...gle.com>, X86 ML <x86@...nel.org>,
Matthew Wilcox <willy@...radead.org>,
Andrew Morton <akpm@...ux-foundation.org>,
kernel list <linux-kernel@...r.kernel.org>,
Linux-MM <linux-mm@...ck.org>,
Andrea Arcangeli <aarcange@...hat.com>,
"Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
jroedel@...e.de, ubizjak@...il.com,
Alistair Popple <apopple@...dia.com>
Subject: Re: [PATCH 01/13] mm: Update ptep_get_lockless()s comment
On Sat, Oct 29, 2022 at 1:15 PM Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
>
> I can think of three options:
>
> (a) filesystems just deal with it
>
> (b) we could move the "page_remove_rmap()" into the "flush-and-free" path too
>
> (c) we could actually add a spinlock (hashed on the page?) for this
>
> I think (a) is basically our current expectation.
Side note: anybody doing gup + set_page_dirty() won't be fixed by b/c
anyway, so I think (a) is basically the only thing.
And that's true even if you do a page pinning gup, since the source of
the gup may be actively unmapped after the gup.
So a filesystem that thinks that only write, or a rmap-accessible mmap
can turn the page dirty really seems to be fundamentally broken.
And I think that has always been the case, it's just that filesystem
writers may not have been happy with it, and may not have had
test-cases for it.
It's not surprising that the filesystem people then try to blame users.
Linus
Powered by blists - more mailing lists