[PATCH 1/2] perf_event: remove unused DEBUG_PERF_USE_VMALLOC

Michael Ellerman mpe at ellerman.id.au
Sat Sep 10 03:27:18 PDT 2016


Kim Phillips <kim.phillips at arm.com> writes:

> This 'DEBUG'-prefixed version of PERF_USE_VMALLOC is not used anywhere.
> It appears to be leftovers from commit 906010b "perf_event: Provide
> vmalloc() based mmap() backing" that introduced it.
>
> Not sure what commit cb30711 "perf_event: Don't allow vmalloc() backed
> perf on powerpc" was trying to do with it either.

Preventing its use on powerpc, because it doesn't work, I thought the
change log was pretty clear:

    perf_event: Don't allow vmalloc() backed perf on powerpc
    
    On powerpc the perf event interrupt is not masked when interrupts are
    disabled, allowing it to function as an NMI.
    
    This causes problems if perf is using vmalloc. If we take a page fault
    on the vmalloc region the fault handler will fail the page fault because
    it detects we are coming in from an NMI (see do_hash_page()).
    
    We don't actually need or want vmalloc backed perf so just disable it on
    powerpc.


If there are ARM cpus that don't want it enabled then you should
probably do a similar patch for ARM.

cheers



More information about the linux-arm-kernel mailing list