lkml.org 
[lkml]   [2018]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Linux 4.18-rc7
    On Wed, Aug 01, 2018 at 01:56:19PM -0700, Linus Torvalds wrote:
    > On Wed, Aug 1, 2018 at 1:52 PM Kirill A. Shutemov <kirill@shutemov.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.

    Okay, I see.

    ARM, unicore32 and xtensa avoid iTLB flush for non-executable VMAs.

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

    I didn't noticied this. Sorry.

    --
    Kirill A. Shutemov

    \
     
     \ /
      Last update: 2018-08-01 23:27    [W:5.404 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site