From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755737AbcIJK1Y (ORCPT ); Sat, 10 Sep 2016 06:27:24 -0400 Received: from ozlabs.org ([103.22.144.67]:58297 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752805AbcIJK1W (ORCPT ); Sat, 10 Sep 2016 06:27:22 -0400 From: Michael Ellerman To: Kim Phillips , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Andrew Morton , Kees Cook , Johannes Weiner , Arnd Bergmann , Tejun Heo Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, Peter Zijlstra , Catalin Marinas , Will Deacon , Mark Rutland Subject: Re: [PATCH 1/2] perf_event: remove unused DEBUG_PERF_USE_VMALLOC In-Reply-To: <20160830140834.6d1edf7abd9d95c02dae7820@arm.com> References: <20160830140834.6d1edf7abd9d95c02dae7820@arm.com> User-Agent: Notmuch/0.21 (https://notmuchmail.org) Date: Sat, 10 Sep 2016 20:27:18 +1000 Message-ID: <87lgz0nj7d.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Kim Phillips 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