* [PATCH 1/2] perf_event: remove unused DEBUG_PERF_USE_VMALLOC
@ 2016-08-30 19:08 ` Kim Phillips
0 siblings, 0 replies; 6+ messages in thread
From: Kim Phillips @ 2016-08-30 19:08 UTC (permalink / raw)
To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Alexander Shishkin, Andrew Morton, Kees Cook, Johannes Weiner,
Arnd Bergmann, Tejun Heo
Cc: linux-kernel, linux-arm-kernel, linuxppc-dev, Peter Zijlstra,
Michael Ellerman, Catalin Marinas, Will Deacon, Mark Rutland
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.
Signed-off-by: Kim Phillips <kim.phillips@arm.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Michael Ellerman <mpe@ellerman.id.au>
---
init/Kconfig | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/init/Kconfig b/init/Kconfig
index cac3f09..934a61f 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1707,19 +1707,6 @@ config PERF_EVENTS
Say Y if unsure.
-config DEBUG_PERF_USE_VMALLOC
- default n
- bool "Debug: use vmalloc to back perf mmap() buffers"
- depends on PERF_EVENTS && DEBUG_KERNEL && !PPC
- select PERF_USE_VMALLOC
- help
- Use vmalloc memory to back perf mmap() buffers.
-
- Mostly useful for debugging the vmalloc code on platforms
- that don't require it.
-
- Say N if unsure.
-
endmenu
config VM_EVENT_COUNTERS
--
2.9.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 1/2] perf_event: remove unused DEBUG_PERF_USE_VMALLOC
@ 2016-08-30 19:08 ` Kim Phillips
0 siblings, 0 replies; 6+ messages in thread
From: Kim Phillips @ 2016-08-30 19:08 UTC (permalink / raw)
To: linux-arm-kernel
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.
Signed-off-by: Kim Phillips <kim.phillips@arm.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Michael Ellerman <mpe@ellerman.id.au>
---
init/Kconfig | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/init/Kconfig b/init/Kconfig
index cac3f09..934a61f 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1707,19 +1707,6 @@ config PERF_EVENTS
Say Y if unsure.
-config DEBUG_PERF_USE_VMALLOC
- default n
- bool "Debug: use vmalloc to back perf mmap() buffers"
- depends on PERF_EVENTS && DEBUG_KERNEL && !PPC
- select PERF_USE_VMALLOC
- help
- Use vmalloc memory to back perf mmap() buffers.
-
- Mostly useful for debugging the vmalloc code on platforms
- that don't require it.
-
- Say N if unsure.
-
endmenu
config VM_EVENT_COUNTERS
--
2.9.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] perf_event: remove unused DEBUG_PERF_USE_VMALLOC
2016-08-30 19:08 ` Kim Phillips
@ 2016-08-31 7:04 ` Peter Zijlstra
-1 siblings, 0 replies; 6+ messages in thread
From: Peter Zijlstra @ 2016-08-31 7:04 UTC (permalink / raw)
To: Kim Phillips
Cc: Ingo Molnar, Arnaldo Carvalho de Melo, Alexander Shishkin,
Andrew Morton, Kees Cook, Johannes Weiner, Arnd Bergmann,
Tejun Heo, linux-kernel, linux-arm-kernel, linuxppc-dev,
Michael Ellerman, Catalin Marinas, Will Deacon, Mark Rutland
On Tue, Aug 30, 2016 at 02:08:34PM -0500, Kim Phillips wrote:
> 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.
>
> Signed-off-by: Kim Phillips <kim.phillips@arm.com>
> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> ---
> init/Kconfig | 13 -------------
> 1 file changed, 13 deletions(-)
>
> diff --git a/init/Kconfig b/init/Kconfig
> index cac3f09..934a61f 100644
> --- a/init/Kconfig
> +++ b/init/Kconfig
> @@ -1707,19 +1707,6 @@ config PERF_EVENTS
>
> Say Y if unsure.
>
> -config DEBUG_PERF_USE_VMALLOC
> - default n
> - bool "Debug: use vmalloc to back perf mmap() buffers"
> - depends on PERF_EVENTS && DEBUG_KERNEL && !PPC
> - select PERF_USE_VMALLOC
^^^^^
It forces the use of vmalloc backed pages for the ring-buffer so that we
can test that code on x86, which otherwise doesn't use it.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] perf_event: remove unused DEBUG_PERF_USE_VMALLOC
@ 2016-08-31 7:04 ` Peter Zijlstra
0 siblings, 0 replies; 6+ messages in thread
From: Peter Zijlstra @ 2016-08-31 7:04 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Aug 30, 2016 at 02:08:34PM -0500, Kim Phillips wrote:
> 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.
>
> Signed-off-by: Kim Phillips <kim.phillips@arm.com>
> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> ---
> init/Kconfig | 13 -------------
> 1 file changed, 13 deletions(-)
>
> diff --git a/init/Kconfig b/init/Kconfig
> index cac3f09..934a61f 100644
> --- a/init/Kconfig
> +++ b/init/Kconfig
> @@ -1707,19 +1707,6 @@ config PERF_EVENTS
>
> Say Y if unsure.
>
> -config DEBUG_PERF_USE_VMALLOC
> - default n
> - bool "Debug: use vmalloc to back perf mmap() buffers"
> - depends on PERF_EVENTS && DEBUG_KERNEL && !PPC
> - select PERF_USE_VMALLOC
^^^^^
It forces the use of vmalloc backed pages for the ring-buffer so that we
can test that code on x86, which otherwise doesn't use it.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] perf_event: remove unused DEBUG_PERF_USE_VMALLOC
2016-08-30 19:08 ` Kim Phillips
@ 2016-09-10 10:27 ` Michael Ellerman
-1 siblings, 0 replies; 6+ messages in thread
From: Michael Ellerman @ 2016-09-10 10:27 UTC (permalink / raw)
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, linux-arm-kernel, linuxppc-dev, Peter Zijlstra,
Catalin Marinas, Will Deacon, Mark Rutland
Kim Phillips <kim.phillips@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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] perf_event: remove unused DEBUG_PERF_USE_VMALLOC
@ 2016-09-10 10:27 ` Michael Ellerman
0 siblings, 0 replies; 6+ messages in thread
From: Michael Ellerman @ 2016-09-10 10:27 UTC (permalink / raw)
To: linux-arm-kernel
Kim Phillips <kim.phillips@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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-09-10 10:27 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-30 19:08 [PATCH 1/2] perf_event: remove unused DEBUG_PERF_USE_VMALLOC Kim Phillips
2016-08-30 19:08 ` Kim Phillips
2016-08-31 7:04 ` Peter Zijlstra
2016-08-31 7:04 ` Peter Zijlstra
2016-09-10 10:27 ` Michael Ellerman
2016-09-10 10:27 ` Michael Ellerman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.