lkml.org 
[lkml]   [2012]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 06/31] mm: Only flush the TLB when clearing an accessible pte
    From: Rik van Riel <riel@redhat.com>

    If ptep_clear_flush() is called to clear a page table entry that is
    accessible anyway by the CPU, eg. a _PAGE_PROTNONE page table entry,
    there is no need to flush the TLB on remote CPUs.

    Signed-off-by: Rik van Riel <riel@redhat.com>
    Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    ---
    mm/pgtable-generic.c | 3 ++-
    1 file changed, 2 insertions(+), 1 deletion(-)

    Index: tip/mm/pgtable-generic.c
    ===================================================================
    --- tip.orig/mm/pgtable-generic.c
    +++ tip/mm/pgtable-generic.c
    @@ -88,7 +88,8 @@ pte_t ptep_clear_flush(struct vm_area_st
    {
    pte_t pte;
    pte = ptep_get_and_clear((vma)->vm_mm, address, ptep);
    - flush_tlb_page(vma, address);
    + if (pte_accessible(pte))
    + flush_tlb_page(vma, address);
    return pte;
    }
    #endif



    \
     
     \ /
      Last update: 2012-10-25 15:41    [W:4.187 / U:0.044 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site