Re: [PATCH v2 10/11] powerpc/perf: add kconfig option for hypervisor provided counters
On 02/24/2014 07:33 PM, Michael Ellerman wrote: On Fri, 2014-14-02 at 22:02:14 UTC, Cody P Schafer wrote: Signed-off-by: Cody P Schafer c...@linux.vnet.ibm.com --- arch/powerpc/perf/Makefile | 2 ++ arch/powerpc/platforms/Kconfig.cputype | 6 ++ 2 files changed, 8 insertions(+) diff --git a/arch/powerpc/perf/Makefile b/arch/powerpc/perf/Makefile index 60d71ee..f9c083a 100644 --- a/arch/powerpc/perf/Makefile +++ b/arch/powerpc/perf/Makefile @@ -11,5 +11,7 @@ obj32-$(CONFIG_PPC_PERF_CTRS) += mpc7450-pmu.o obj-$(CONFIG_FSL_EMB_PERF_EVENT) += core-fsl-emb.o obj-$(CONFIG_FSL_EMB_PERF_EVENT_E500) += e500-pmu.o e6500-pmu.o +obj-$(CONFIG_HV_PERF_CTRS) += hv-24x7.o hv-gpci.o hv-common.o + obj-$(CONFIG_PPC64) += $(obj64-y) obj-$(CONFIG_PPC32) += $(obj32-y) diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype index 434fda3..dcc67cd 100644 --- a/arch/powerpc/platforms/Kconfig.cputype +++ b/arch/powerpc/platforms/Kconfig.cputype @@ -364,6 +364,12 @@ config PPC_PERF_CTRS help This enables the powerpc-specific perf_event back-end. +config HV_PERF_CTRS + def_bool y This was bool, why did you change it? No, it wasn't. v1 also had def_bool. https://lkml.org/lkml/2014/1/16/518 Maybe you're confusing v2.1 and v2 of this patch? + depends on PERF_EVENTS PPC_HAVE_PMU_SUPPORT Should be: depends on PERF_EVENTS PPC_PSERIES + help + Enable access to perf counters provided by the hypervisor + Yep, the v2.1 patch (which I bungled and labeled as 9/11) already changes both of these. It'll end up rolled into v3. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v2 10/11] powerpc/perf: add kconfig option for hypervisor provided counters
On Tue, 2014-02-25 at 13:31 -0800, Cody P Schafer wrote: On 02/24/2014 07:33 PM, Michael Ellerman wrote: On Fri, 2014-14-02 at 22:02:14 UTC, Cody P Schafer wrote: Signed-off-by: Cody P Schafer c...@linux.vnet.ibm.com --- arch/powerpc/perf/Makefile | 2 ++ arch/powerpc/platforms/Kconfig.cputype | 6 ++ 2 files changed, 8 insertions(+) diff --git a/arch/powerpc/perf/Makefile b/arch/powerpc/perf/Makefile index 60d71ee..f9c083a 100644 --- a/arch/powerpc/perf/Makefile +++ b/arch/powerpc/perf/Makefile @@ -11,5 +11,7 @@ obj32-$(CONFIG_PPC_PERF_CTRS)+= mpc7450-pmu.o obj-$(CONFIG_FSL_EMB_PERF_EVENT) += core-fsl-emb.o obj-$(CONFIG_FSL_EMB_PERF_EVENT_E500) += e500-pmu.o e6500-pmu.o +obj-$(CONFIG_HV_PERF_CTRS) += hv-24x7.o hv-gpci.o hv-common.o + obj-$(CONFIG_PPC64) += $(obj64-y) obj-$(CONFIG_PPC32) += $(obj32-y) diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype index 434fda3..dcc67cd 100644 --- a/arch/powerpc/platforms/Kconfig.cputype +++ b/arch/powerpc/platforms/Kconfig.cputype @@ -364,6 +364,12 @@ config PPC_PERF_CTRS help This enables the powerpc-specific perf_event back-end. +config HV_PERF_CTRS + def_bool y This was bool, why did you change it? No, it wasn't. v1 also had def_bool. https://lkml.org/lkml/2014/1/16/518 Maybe you're confusing v2.1 and v2 of this patch? Er yes. Point releases of a patch series confuse me :) + depends on PERF_EVENTS PPC_HAVE_PMU_SUPPORT Should be: depends on PERF_EVENTS PPC_PSERIES + help + Enable access to perf counters provided by the hypervisor + Yep, the v2.1 patch (which I bungled and labeled as 9/11) already changes both of these. It'll end up rolled into v3. Yes please. cheers ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v2 10/11] powerpc/perf: add kconfig option for hypervisor provided counters
On Fri, 2014-14-02 at 22:02:14 UTC, Cody P Schafer wrote: Signed-off-by: Cody P Schafer c...@linux.vnet.ibm.com --- arch/powerpc/perf/Makefile | 2 ++ arch/powerpc/platforms/Kconfig.cputype | 6 ++ 2 files changed, 8 insertions(+) diff --git a/arch/powerpc/perf/Makefile b/arch/powerpc/perf/Makefile index 60d71ee..f9c083a 100644 --- a/arch/powerpc/perf/Makefile +++ b/arch/powerpc/perf/Makefile @@ -11,5 +11,7 @@ obj32-$(CONFIG_PPC_PERF_CTRS) += mpc7450-pmu.o obj-$(CONFIG_FSL_EMB_PERF_EVENT) += core-fsl-emb.o obj-$(CONFIG_FSL_EMB_PERF_EVENT_E500) += e500-pmu.o e6500-pmu.o +obj-$(CONFIG_HV_PERF_CTRS) += hv-24x7.o hv-gpci.o hv-common.o + obj-$(CONFIG_PPC64) += $(obj64-y) obj-$(CONFIG_PPC32) += $(obj32-y) diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype index 434fda3..dcc67cd 100644 --- a/arch/powerpc/platforms/Kconfig.cputype +++ b/arch/powerpc/platforms/Kconfig.cputype @@ -364,6 +364,12 @@ config PPC_PERF_CTRS help This enables the powerpc-specific perf_event back-end. +config HV_PERF_CTRS + def_bool y This was bool, why did you change it? + depends on PERF_EVENTS PPC_HAVE_PMU_SUPPORT Should be: depends on PERF_EVENTS PPC_PSERIES + help + Enable access to perf counters provided by the hypervisor + cheers ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v2 10/11] powerpc/perf: add kconfig option for hypervisor provided counters
On 02/16/2014 11:11 PM, Michael Ellerman wrote: On Fri, 2014-02-14 at 16:25 -0800, Cody P Schafer wrote: On Fri, Feb 14, 2014 at 04:32:13PM -0600, Scott Wood wrote: On Fri, 2014-02-14 at 14:02 -0800, Cody P Schafer wrote: diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype index 434fda3..dcc67cd 100644 --- a/arch/powerpc/platforms/Kconfig.cputype +++ b/arch/powerpc/platforms/Kconfig.cputype @@ -364,6 +364,12 @@ config PPC_PERF_CTRS help This enables the powerpc-specific perf_event back-end. +config HV_PERF_CTRS + def_bool y + depends on PERF_EVENTS PPC_HAVE_PMU_SUPPORT + help + Enable access to perf counters provided by the hypervisor Please don't add default-y stuff that is platform-specific, and definitely point out that platform dependency in the config description -- I have to look elsewhere in the patchset to determine that this is for Power Hypervisor. PPC_HAVE_PMU_SUPPORT is enabled by all 6xx builds, even for hardware like e300 that doesn't have PMU at all (it has the FSL embedded perfmon instead), much less this hv interface. And yes, PPC_PERF_CTRS has the same problem and should be fixed. :-) Yep, I just based this one on what PPC_PERF_CTRS was doing. How about the following: +config HV_PERF_CTRS + bool Perf Hypervisor supplied counters Support for Hypervisor supplied PMU events (24x7 GPCI) ? Sounds good to me. + default y + depends on PERF_EVENTS PPC_HAVE_PMU_SUPPORT PPC_PSERIES I think you just want: depends on PERF_EVENTS PPC_PSERIES Because you're adding two completely new PMUs, they're not a struct power_pmu backend for the existing powerpc PMU implementation. Ack. I'll fix this up in v3 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v2 10/11] powerpc/perf: add kconfig option for hypervisor provided counters
On Fri, 2014-02-14 at 16:25 -0800, Cody P Schafer wrote: On Fri, Feb 14, 2014 at 04:32:13PM -0600, Scott Wood wrote: On Fri, 2014-02-14 at 14:02 -0800, Cody P Schafer wrote: diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype index 434fda3..dcc67cd 100644 --- a/arch/powerpc/platforms/Kconfig.cputype +++ b/arch/powerpc/platforms/Kconfig.cputype @@ -364,6 +364,12 @@ config PPC_PERF_CTRS help This enables the powerpc-specific perf_event back-end. +config HV_PERF_CTRS + def_bool y + depends on PERF_EVENTS PPC_HAVE_PMU_SUPPORT + help + Enable access to perf counters provided by the hypervisor Please don't add default-y stuff that is platform-specific, and definitely point out that platform dependency in the config description -- I have to look elsewhere in the patchset to determine that this is for Power Hypervisor. PPC_HAVE_PMU_SUPPORT is enabled by all 6xx builds, even for hardware like e300 that doesn't have PMU at all (it has the FSL embedded perfmon instead), much less this hv interface. And yes, PPC_PERF_CTRS has the same problem and should be fixed. :-) Yep, I just based this one on what PPC_PERF_CTRS was doing. How about the following: +config HV_PERF_CTRS + bool Perf Hypervisor supplied counters Support for Hypervisor supplied PMU events (24x7 GPCI) ? + default y + depends on PERF_EVENTS PPC_HAVE_PMU_SUPPORT PPC_PSERIES I think you just want: depends on PERF_EVENTS PPC_PSERIES Because you're adding two completely new PMUs, they're not a struct power_pmu backend for the existing powerpc PMU implementation. cheers ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v2 10/11] powerpc/perf: add kconfig option for hypervisor provided counters
On Fri, 2014-02-14 at 14:02 -0800, Cody P Schafer wrote: Signed-off-by: Cody P Schafer c...@linux.vnet.ibm.com --- arch/powerpc/perf/Makefile | 2 ++ arch/powerpc/platforms/Kconfig.cputype | 6 ++ 2 files changed, 8 insertions(+) diff --git a/arch/powerpc/perf/Makefile b/arch/powerpc/perf/Makefile index 60d71ee..f9c083a 100644 --- a/arch/powerpc/perf/Makefile +++ b/arch/powerpc/perf/Makefile @@ -11,5 +11,7 @@ obj32-$(CONFIG_PPC_PERF_CTRS) += mpc7450-pmu.o obj-$(CONFIG_FSL_EMB_PERF_EVENT) += core-fsl-emb.o obj-$(CONFIG_FSL_EMB_PERF_EVENT_E500) += e500-pmu.o e6500-pmu.o +obj-$(CONFIG_HV_PERF_CTRS) += hv-24x7.o hv-gpci.o hv-common.o + obj-$(CONFIG_PPC64) += $(obj64-y) obj-$(CONFIG_PPC32) += $(obj32-y) diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype index 434fda3..dcc67cd 100644 --- a/arch/powerpc/platforms/Kconfig.cputype +++ b/arch/powerpc/platforms/Kconfig.cputype @@ -364,6 +364,12 @@ config PPC_PERF_CTRS help This enables the powerpc-specific perf_event back-end. +config HV_PERF_CTRS + def_bool y + depends on PERF_EVENTS PPC_HAVE_PMU_SUPPORT + help + Enable access to perf counters provided by the hypervisor Please don't add default-y stuff that is platform-specific, and definitely point out that platform dependency in the config description -- I have to look elsewhere in the patchset to determine that this is for Power Hypervisor. PPC_HAVE_PMU_SUPPORT is enabled by all 6xx builds, even for hardware like e300 that doesn't have PMU at all (it has the FSL embedded perfmon instead), much less this hv interface. And yes, PPC_PERF_CTRS has the same problem and should be fixed. :-) -Scott ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v2 10/11] powerpc/perf: add kconfig option for hypervisor provided counters
On Fri, Feb 14, 2014 at 04:32:13PM -0600, Scott Wood wrote: On Fri, 2014-02-14 at 14:02 -0800, Cody P Schafer wrote: Signed-off-by: Cody P Schafer c...@linux.vnet.ibm.com --- arch/powerpc/perf/Makefile | 2 ++ arch/powerpc/platforms/Kconfig.cputype | 6 ++ 2 files changed, 8 insertions(+) diff --git a/arch/powerpc/perf/Makefile b/arch/powerpc/perf/Makefile index 60d71ee..f9c083a 100644 --- a/arch/powerpc/perf/Makefile +++ b/arch/powerpc/perf/Makefile @@ -11,5 +11,7 @@ obj32-$(CONFIG_PPC_PERF_CTRS) += mpc7450-pmu.o obj-$(CONFIG_FSL_EMB_PERF_EVENT) += core-fsl-emb.o obj-$(CONFIG_FSL_EMB_PERF_EVENT_E500) += e500-pmu.o e6500-pmu.o +obj-$(CONFIG_HV_PERF_CTRS) += hv-24x7.o hv-gpci.o hv-common.o + obj-$(CONFIG_PPC64)+= $(obj64-y) obj-$(CONFIG_PPC32)+= $(obj32-y) diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype index 434fda3..dcc67cd 100644 --- a/arch/powerpc/platforms/Kconfig.cputype +++ b/arch/powerpc/platforms/Kconfig.cputype @@ -364,6 +364,12 @@ config PPC_PERF_CTRS help This enables the powerpc-specific perf_event back-end. +config HV_PERF_CTRS + def_bool y + depends on PERF_EVENTS PPC_HAVE_PMU_SUPPORT + help + Enable access to perf counters provided by the hypervisor Please don't add default-y stuff that is platform-specific, and definitely point out that platform dependency in the config description -- I have to look elsewhere in the patchset to determine that this is for Power Hypervisor. PPC_HAVE_PMU_SUPPORT is enabled by all 6xx builds, even for hardware like e300 that doesn't have PMU at all (it has the FSL embedded perfmon instead), much less this hv interface. And yes, PPC_PERF_CTRS has the same problem and should be fixed. :-) Yep, I just based this one on what PPC_PERF_CTRS was doing. How about the following: +config HV_PERF_CTRS + bool Perf Hypervisor supplied counters + default y + depends on PERF_EVENTS PPC_HAVE_PMU_SUPPORT PPC_PSERIES + help + Enable access to hypervisor supplied counters in perf. Currently, + this enables code that uses the hcall GetPerfCounterInfo and 24x7 + interfaces to retrieve counters. GPCI exists on Power 6 and later + systems. 24x7 is available on Power 8 systems. + + If unsure, select Y. And relocated to arch/powerpc/platforms/Kconfig (as this isn't really strictly cputype related). ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev