Re: [PATCH 2/2] cpufreq: Debugging options for the cpufreq subsystem
On 17/10/12 06:20, Viresh Kumar wrote: This adds Kconfig options for DEBUG and VERBOSE_DEBUG to the cpufreq subsystem, This is pretty useful for developers who want to debug cpufreq subsystem and don't want to editing the Makefile manually each time they want to debug. You can easily overcome this issue using dynamic debugging. You need not recompile the code enabling debug if CONFIG_DYNAMIC_DEBUG is enabled. Regards, Sudeep ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
Re: [PATCH 1/2] cpufreq: Improve debug prints
On 17/10/12 06:20, Viresh Kumar wrote: With debug options on, it is difficult to locate cpufreq core's debug prints. Fix this by prefixing debug prints with: cpufreq: With CONFIG_DYNAMIC_DEBUG, you can control(enable/disable) debug prints at different levels (file, module, line, function) Regards, Sudeep ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
Re: [PATCH 1/2] cpufreq: Improve debug prints
On 17/10/12 10:39, Viresh Kumar wrote: On 17 October 2012 14:55, Sudeep KarkadaNagesha sudeep.karkadanage...@arm.com wrote: With CONFIG_DYNAMIC_DEBUG, you can control(enable/disable) debug prints at different levels (file, module, line, function) Quickly went through this :) http://www.kernel.org/doc/ols/2009/ols2009-pages-39-46.pdf May be kernel/Documentation/dynamic-debug-howto.txt is more up-to-date. My usecase is a bit different. I want to see all bootprints with cpufreq pr_debug prints. So, this prefixing will help there. Also, i am not sure if dynamic debug will help in boot prints too? The document covers Debug messages during Boot Process even though I have never tried :) Regards, Sudeep ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
Re: [Query]: CPUFREQ: Affected and related cpus in cpufreq
Hi Viresh, On 08/10/12 14:58, viresh kumar wrote: Hi All, Sorry for asking one of the most basic question of cpufreq :( I couldn't get the difference between affected (policy-cpus) and related cpus (policy-related_cpus) in cpufreq... As per Documentation/code: affected_cpus(policy-cpus): - List of CPUs that require software coordination of frequency. - Processors part of affected_cpus share policy struct - Policy limits the frequencies that the processor can work with. related_cpus(policy-related_cpus): - List of CPUs that need some sort of frequency coordination, whether software or hardware. - Processors part of related_cpus share governer. Which document states this ? As per my understanding and if you see in cpufreq.c, related_cpus are used only when adding back the hotplugged cpu to get the governor. Elsewhere affected_cpus is used. Ideally it would be good if above statements is true. E.g. In SMP with 4 CPUs(with same OPPs), if 0-1 and 2-3 need h/w co-ordination, then: related_cpus: 0-1 and 2-3 affected_cpus: case#1: 0-1 and 2-3 if we want to have different policies case#2: 0-3 if we want to have same policy on all CPUS I believe this is not possible in current code. - Governer sets the rules, about when to change limits specified by policy. Correct? So, now comes the real question: - In which scenario's should we populate affected and related cpus? - Should related cpus will always be a superset of affected cpus? -- Viresh ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
Re: [Query]: CPUFREQ: Affected and related cpus in cpufreq
On 10/10/12 14:26, Viresh Kumar wrote: [...] I couldn't understand the difference b/w h/w and s/w coordination. What do we mean by them here. Following patch added related related_cpu stuff: commit e8628dd06d66f2e3965ec9742029b401d63434f1 Author: Darrick J. Wong djw...@us.ibm.com Date: Fri Apr 18 13:31:12 2008 -0700 [CPUFREQ] expose cpufreq coordination requirements regardless of coordination mechanism Currently, affected_cpus shows which CPUs need to have their frequency coordinated in software. When hardware coordination is in use, the contents of this file appear the same as when no coordination is required. This can lead to some confusion among user-space programs, for example, that do not know that extra coordination is required to force a CPU core to a particular speed to control power consumption. To fix this, create a related_cpus attribute that always displays the coordination map regardless of whatever coordination strategy the cpufreq driver uses (sw or hw). If the cpufreq driver does not provide a value, fall back to policy-cpus. Signed-off-by: Darrick J. Wong djw...@us.ibm.com Signed-off-by: Andrew Morton a...@linux-foundation.org Signed-off-by: Dave Jones da...@redhat.com --- Here is my understanding on this patch. This change is closely related to ACPI cpufreq driver(used mostly on Intel cores). This change was introduced to keep track of the related cpus as returned by ACPI firmware along with affected cpus as imposed by SW. I don't understand the exact difference in Intel cores. I believe it's just for tracking and not used much in the driver. Regards, Sudeep ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
Re: [PATCH] cpufreq: vexpress: cpufreq driver name can't be longer than 15 chars
On 09/10/12 08:10, Viresh Kumar wrote: Following is the declaration of name field in struct cpufreq_driver: char name[CPUFREQ_NAME_LEN]; where CPUFREQ_NAME_LEN is 16. So, length of drivers name must be =15 (one position for '\0'). Current name is crossing this limit and so name doesn't get printed properly when we do: $ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver This patch renames driver-name to fix this issue. Signed-off-by: Viresh Kumar viresh.ku...@linaro.org Acked-by: Sudeep KarkadaNagesha sudeep.karkadanage...@arm.com --- drivers/cpufreq/vexpress_bL_cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/vexpress_bL_cpufreq.c b/drivers/cpufreq/vexpress_bL_cpufreq.c index 8b7ec18..541fc40 100644 --- a/drivers/cpufreq/vexpress_bL_cpufreq.c +++ b/drivers/cpufreq/vexpress_bL_cpufreq.c @@ -244,7 +244,7 @@ static struct cpufreq_driver vexpress_cpufreq_driver = { .target = vexpress_cpufreq_set_target, .get= vexpress_cpufreq_get, .init = vexpress_cpufreq_init, - .name = cpufreq_vexpress, + .name = vexpress-bL, .attr = vexpress_cpufreq_attr, }; -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
Re: [PATCH] cpufreq: vexpress: cpufreq driver name can't be longer than 15 chars
On 09/10/12 11:33, Amit Kucheria wrote: On Tue, Oct 9, 2012 at 2:13 PM, Jon Medhurst (Tixy) t...@linaro.org wrote: On Tue, 2012-10-09 at 09:27 +0100, Sudeep KarkadaNagesha wrote: On 09/10/12 08:10, Viresh Kumar wrote: Following is the declaration of name field in struct cpufreq_driver: char name[CPUFREQ_NAME_LEN]; where CPUFREQ_NAME_LEN is 16. So, length of drivers name must be =15 (one position for '\0'). Current name is crossing this limit and so name doesn't get printed properly when we do: $ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver This patch renames driver-name to fix this issue. Signed-off-by: Viresh Kumar viresh.ku...@linaro.org Acked-by: Sudeep KarkadaNagesha sudeep.karkadanage...@arm.com Shall I apply this to the ARM Landing Team vexpress tree then? I'd say yes, the driver lives in your tree. I'm not sure how you coordinate the code drops with ARM since it should be in their tree as well for the future. Robin raised a valid point that this driver is TC2 specific and bL is not appropriate name for it including the file name(my bad choice at first). --- drivers/cpufreq/vexpress_bL_cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/vexpress_bL_cpufreq.c b/drivers/cpufreq/vexpress_bL_cpufreq.c index 8b7ec18..541fc40 100644 --- a/drivers/cpufreq/vexpress_bL_cpufreq.c +++ b/drivers/cpufreq/vexpress_bL_cpufreq.c @@ -244,7 +244,7 @@ static struct cpufreq_driver vexpress_cpufreq_driver = { .target = vexpress_cpufreq_set_target, .get= vexpress_cpufreq_get, .init = vexpress_cpufreq_init, - .name = cpufreq_vexpress, + .name = vexpress-bL, .attr = vexpress_cpufreq_attr, }; -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
[PULL REQUEST]: ARM: perf: multi-PMU support v2
Hi Viresh, Please pull the following changes(v2) for the multiple CPU PMU support (re-based to v3.6). Changes v1-v2: 1. Incorporated review comments from Will for few patches(which he will be queuing for v3.8) 2. Dropped ARM: perf: register the init functions with the bindings, still looking for alternate to list in implementation. 3. Added per-process event tracking support on multi-PMUs. Re-factored the original patch ARM: perf: add support for per-cluster/multiple PMUs 4. Fixed the bug reported by Tixy for non-FDT case The following changes since commit a0d271cbfed1dd50278c6b06bead3d00ba0a88f9: Linux 3.6 (2012-09-30 16:47:46 -0700) are available in the git repository at: ssh://usern...@pdsw-ci.cambridge.arm.com:29418/kernel.git multi_pmu_v2 for you to fetch changes up to bd7fc4c65bd8ed994ded5aa0feeef91190fbd7be: ARM: perf: save/restore pmu registers in pm notifier (2012-10-09 18:20:45 +0100) Axel Lin (1): ARM: ux500: Fix build error due to missing include of asm/pmu.h in cpu-db8500.c Jon Hunter (1): ARM: PMU: Add runtime PM Support Lorenzo Pieralisi (1): ARM: kernel: provide cluster to logical cpu mask mapping API Marc Zyngier (1): ARM: perf: add guest vs host discrimination Mark Rutland (1): ARM: perf: register cpu_notifier at driver init Sudeep KarkadaNagesha (11): ARM: pmu: remove arm_pmu_type enumeration ARM: perf: move irq registration into pmu implementation ARM: perf: allocate CPU PMU dynamically at probe time ARM: perf: consistently use struct perf_event in arm_pmu functions ARM: perf: check ARMv7 counter validity on a per-pmu basis ARM: perf: replace global CPU PMU pointer with per-cpu pointers ARM: perf: register CPU PMUs with idr types ARM: perf: set cpu affinity to support multiple PMUs ARM: perf: set cpu affinity for the irqs correctly ARM: perf: remove spaces in CPU PMU names ARM: perf: save/restore pmu registers in pm notifier Will Deacon (8): ARM: perf: add devicetree bindings for 11MPcore, A5, A7 and A15 PMUs ARM: pmu: remove unused reservation mechanism ARM: perf: remove mysterious compiler barrier ARM: perf: probe devicetree in preference to current CPU ARM: perf: prepare for moving CPU PMU code into separate file ARM: perf: move CPU-specific PMU handling code into separate file ARM: perf: return NOTIFY_DONE from cpu notifier when no available PMU ARM: perf: consistently use arm_pmu-name for PMU name Documentation/devicetree/bindings/arm/pmu.txt |7 + MAINTAINERS |1 - arch/arm/Kconfig |8 +- arch/arm/include/asm/perf_event.h | 14 +- arch/arm/include/asm/pmu.h| 111 +++ arch/arm/include/asm/topology.h |3 + arch/arm/kernel/Makefile |3 +- arch/arm/kernel/perf_event.c | 444 +++-- arch/arm/kernel/perf_event_cpu.c | 380 + arch/arm/kernel/perf_event_v6.c | 134 arch/arm/kernel/perf_event_v7.c | 307 + arch/arm/kernel/perf_event_xscale.c | 163 - arch/arm/kernel/pmu.c | 36 -- arch/arm/kernel/topology.c| 27 ++ arch/arm/mach-bcmring/arch.c |3 +- arch/arm/mach-omap2/devices.c |3 +- arch/arm/mach-pxa/devices.c |3 +- arch/arm/mach-realview/realview_eb.c |3 +- arch/arm/mach-realview/realview_pb1176.c |3 +- arch/arm/mach-realview/realview_pb11mp.c |3 +- arch/arm/mach-realview/realview_pba8.c|3 +- arch/arm/mach-realview/realview_pbx.c |3 +- arch/arm/mach-tegra/devices.c |3 +- arch/arm/mach-ux500/cpu-db8500.c |4 +- arch/arm/mach-vexpress/ct-ca9x4.c |3 +- arch/arm/plat-iop/pmu.c |3 +- arch/arm/plat-samsung/devs.c |3 +- 27 files changed, 942 insertions(+), 736 deletions(-) create mode 100644 arch/arm/kernel/perf_event_cpu.c delete mode 100644 arch/arm/kernel/pmu.c -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
[PULL REQUEST]: ARM: perf: multi-PMU support
Hi Viresh, Please pull the following changes for the multiple CPU PMU support (re-based to v3.6-rc5). Few patches in the list below are already queued up for 3.7. Since you have access to internal repository, I am posting patches on the same. Let me know if you face any issues. --- The following changes since commit 55d512e245bc7699a8800e23df1a24195dd08217: Linux 3.6-rc5 (2012-09-08 16:43:45 -0700) are available in the git repository at: ssh://usern...@pdsw-ci.cambridge.arm.com:29418/kernel.git multi_pmu_v1 for you to fetch changes up to ec3a17b94b09870468db575b95fa92c50c9cc778: ARM: ux500: Fix build error due to missing include of asm/pmu.h in cpu-db8500.c (2012-09-14 10:00:47 +0100) Axel Lin (1): ARM: ux500: Fix build error due to missing include of asm/pmu.h in cpu-db8500.c Jon Hunter (1): ARM: PMU: Add runtime PM Support Lorenzo Pieralisi (1): ARM: kernel: provide cluster to logical cpu mask mapping API Sudeep KarkadaNagesha (9): ARM: pmu: remove arm_pmu_type enumeration ARM: perf: move irq registration into pmu implementation ARM: perf: allocation of cpu_pmu at init time ARM: perf: change multiple arm_pmu function parameters to struct perf_event ARM: perf: rework on armv7_pmnc_counter_valid ARM: perf: define per-cpu arm_pmu instead of a single global pointer ARM: perf: register the init functions with the bindings ARM: perf: add support for per-cluster/multiple PMUs ARM: perf: save/restore pmu registers in pm notifier Will Deacon (6): ARM: perf: add devicetree bindings for 11MPcore, A5, A7 and A15 PMUs ARM: pmu: remove unused reservation mechanism ARM: perf: remove mysterious compiler barrier ARM: perf: probe devicetree in preference to current CPU ARM: perf: prepare for moving CPU PMU code into separate file ARM: perf: move CPU-specific PMU handling code into separate file Documentation/devicetree/bindings/arm/pmu.txt |7 + MAINTAINERS |1 - arch/arm/Kconfig |8 +- arch/arm/include/asm/perf_event.h |9 +- arch/arm/include/asm/pmu.h| 128 arch/arm/include/asm/topology.h |3 + arch/arm/kernel/Makefile |4 +- arch/arm/kernel/perf_event.c | 391 + arch/arm/kernel/perf_event_cpu.c | 351 ++ arch/arm/kernel/perf_event_v6.c | 152 +- arch/arm/kernel/perf_event_v7.c | 330 - arch/arm/kernel/perf_event_xscale.c | 179 ++- arch/arm/kernel/pmu.c | 36 --- arch/arm/kernel/topology.c| 27 ++ arch/arm/mach-bcmring/arch.c |3 +- arch/arm/mach-omap2/devices.c |3 +- arch/arm/mach-pxa/devices.c |3 +- arch/arm/mach-realview/realview_eb.c |3 +- arch/arm/mach-realview/realview_pb1176.c |3 +- arch/arm/mach-realview/realview_pb11mp.c |3 +- arch/arm/mach-realview/realview_pba8.c|3 +- arch/arm/mach-realview/realview_pbx.c |3 +- arch/arm/mach-tegra/devices.c |3 +- arch/arm/mach-ux500/cpu-db8500.c |4 +- arch/arm/mach-vexpress/ct-ca9x4.c |3 +- arch/arm/plat-iop/pmu.c |3 +- arch/arm/plat-samsung/devs.c |3 +- 27 files changed, 916 insertions(+), 750 deletions(-) create mode 100644 arch/arm/kernel/perf_event_cpu.c delete mode 100644 arch/arm/kernel/pmu.c ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev