lkml.org 
[lkml]   [2013]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] mm/x86: Flush lazy MMU when DEBUG_PAGEALLOC is set
    Greg, policy opinion?

    -hpa

    On 02/26/2013 03:57 PM, Boris Ostrovsky wrote:
    >
    > ----- hpa@zytor.com wrote:
    >
    >> On 02/26/2013 02:56 PM, Boris Ostrovsky wrote:
    >>> When CONFIG_DEBUG_PAGEALLOC is set page table updates made by
    >>> kernel_map_pages() are not made visible (via TLB flush) immediately
    >> if lazy
    >>> MMU is on. In environments that support lazy MMU (e.g. Xen) this may
    >> lead to
    >>> fatal page faults, for example, when zap_pte_range() needs to
    >> allocate pages
    >>> in __tlb_remove_page() -> tlb_next_batch().
    >>>
    >>> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
    >>> ---
    >>> arch/x86/mm/pageattr.c | 2 ++
    >>> 1 file changed, 2 insertions(+)
    >>>
    >>> diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
    >>> index ca1f1c2..7b3216e 100644
    >>> --- a/arch/x86/mm/pageattr.c
    >>> +++ b/arch/x86/mm/pageattr.c
    >>> @@ -1369,6 +1369,8 @@ void kernel_map_pages(struct page *page, int
    >> numpages, int enable)
    >>> * but that can deadlock->flush only current cpu:
    >>> */
    >>> __flush_tlb_all();
    >>> +
    >>> + arch_flush_lazy_mmu_mode();
    >>> }
    >>>
    >>> #ifdef CONFIG_HIBERNATION
    >>>
    >>
    >> This sounds like a critical fix, i.e. a -stable candidate. Am I
    >> correct?
    >
    > I considered copying stable but then I decided that this is a debugging feature
    > --- kernel_map_pages() is only defined if CONFIG_DEBUG_PAGEALLOC is set and my
    > thinking was that stable kernels usually don't do this.
    >
    >
    > -boris
    >



    \
     
     \ /
      Last update: 2013-02-28 00:01    [W:2.585 / U:0.784 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site