[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFzDxsUU8jUyJN7J35TfeUh7n2xRDjEbW-A-2Fq1CDYQ0w@mail.gmail.com>
Date: Wed, 1 Aug 2018 13:56:19 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: "Kirill A. Shutemov" <kirill@...temov.name>
Cc: Tony Luck <tony.luck@...el.com>,
Amit Pundir <amit.pundir@...aro.org>,
John Stultz <john.stultz@...aro.org>,
Hugh Dickins <hughd@...gle.com>,
Matthew Wilcox <willy@...radead.org>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Dmitry Vyukov <dvyukov@...gle.com>,
Oleg Nesterov <oleg@...hat.com>,
Andrea Arcangeli <aarcange@...hat.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-mm <linux-mm@...ck.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
youling 257 <youling257@...il.com>,
Joel Fernandes <joelaf@...gle.com>,
Colin Cross <ccross@...gle.com>
Subject: Re: Linux 4.18-rc7
On Wed, Aug 1, 2018 at 1:52 PM Kirill A. Shutemov <kirill@...temov.name> wrote:
>
> Is there a reason why we pass vma to flush_tlb_range?
Yes. It's even in that patch.
The fact is, real MM users *have* a vma, and passing it in to the TLB
flushing is the right thing to do. That allows architectures that care
(mainly powerpc, I think) to notice that "hey, this range only had
execute permissions, so I only need to flush the ITLB".
The people who use tlb_flush_range() any other way are doing an
arch-specific hack. It's not how tlb_flush_range() was defined, and
it's not how you can use it in general.
> It's not obvious to me what information from VMA can be useful for an
> implementation.
See the patch I sent, which had this as part of it:
- * XXX fix me: flush_tlb_range() should take an mm
pointer instead of a
- * vma pointer.
+ * flush_tlb_range() takes a vma instead of a mm pointer because
+ * some architectures want the vm_flags for ITLB/DTLB flush.
because I wanted to educate people about why the interface was what it
was, and the "fixme" was bogus shit.
> In longer term we can change the interface to take mm instead of vma.
FUCK NO!
Goddammit, read the code, or read the patch. The places ytou added
those broken vma_init() calls to were architecture-specific hacks.
Those architecture-specific hacks do not get to screw up the design
for everybody else.
Linus
Powered by blists - more mailing lists