Current cpufreq stats has got three parts: time_in_state, total_trans and
trans_table.
trans_table was present under a separate macro's from others:
CONFIG_CPU_FREQ_STAT_DETAILS
The reason quoted for that was:
- trans_table goes against the traditional /sysfs rule of one value per
interface. It provides a whole bunch of value in a 2 dimensional matrix form.
I don't understand how necessary it is to keep trans_table inside a separate
macro. These are all cpufreq sysfs stats, probably it doesn't matter if its one
dimensional or two.
Lets remove CONFIG_CPU_FREQ_STAT_DETAILS and use CONFIG_CPU_FREQ_STAT only to
make code more cleaner (i.e. remove unnecessary macros).
Signed-off-by: Viresh Kumar <viresh.kumar(a)linaro.org>
---
Documentation/cpu-freq/cpufreq-stats.txt | 18 ++++--------------
arch/mips/configs/lemote2f_defconfig | 1 -
arch/powerpc/configs/ppc6xx_defconfig | 1 -
arch/sh/configs/sh7785lcr_32bit_defconfig | 1 -
drivers/cpufreq/Kconfig | 9 ---------
drivers/cpufreq/cpufreq_stats.c | 12 ------------
6 files changed, 4 insertions(+), 38 deletions(-)
diff --git a/Documentation/cpu-freq/cpufreq-stats.txt b/Documentation/cpu-freq/cpufreq-stats.txt
index fc64749..838f990 100644
--- a/Documentation/cpu-freq/cpufreq-stats.txt
+++ b/Documentation/cpu-freq/cpufreq-stats.txt
@@ -111,18 +111,8 @@ Config Main Menu
cpufreq-stats.
"CPU frequency translation statistics" (CONFIG_CPU_FREQ_STAT) provides the
-basic statistics which includes time_in_state and total_trans.
-
-"CPU frequency translation statistics details" (CONFIG_CPU_FREQ_STAT_DETAILS)
-provides fine grained cpufreq stats by trans_table. The reason for having a
-separate config option for trans_table is:
-- trans_table goes against the traditional /sysfs rule of one value per
- interface. It provides a whole bunch of value in a 2 dimensional matrix
- form.
-
-Once these two options are enabled and your CPU supports cpufrequency, you
-will be able to see the CPU frequency statistics in /sysfs.
-
-
-
+statistics which includes time_in_state, total_trans and fine grained cpufreq
+stats by trans_table.
+Once this option is enabled and your CPU supports cpufrequency, you will be able
+to see the CPU frequency statistics in /sysfs.
diff --git a/arch/mips/configs/lemote2f_defconfig b/arch/mips/configs/lemote2f_defconfig
index 343bebc..f9229e9 100644
--- a/arch/mips/configs/lemote2f_defconfig
+++ b/arch/mips/configs/lemote2f_defconfig
@@ -41,7 +41,6 @@ CONFIG_PM_RUNTIME=y
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_DEBUG=y
CONFIG_CPU_FREQ_STAT=m
-CONFIG_CPU_FREQ_STAT_DETAILS=y
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=m
CONFIG_CPU_FREQ_GOV_USERSPACE=m
diff --git a/arch/powerpc/configs/ppc6xx_defconfig b/arch/powerpc/configs/ppc6xx_defconfig
index be1cb6e..bb7664c 100644
--- a/arch/powerpc/configs/ppc6xx_defconfig
+++ b/arch/powerpc/configs/ppc6xx_defconfig
@@ -58,7 +58,6 @@ CONFIG_GEF_SBC610=y
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_DEBUG=y
CONFIG_CPU_FREQ_STAT=m
-CONFIG_CPU_FREQ_STAT_DETAILS=y
CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=m
diff --git a/arch/sh/configs/sh7785lcr_32bit_defconfig b/arch/sh/configs/sh7785lcr_32bit_defconfig
index 9bdcf72..7ce136d 100644
--- a/arch/sh/configs/sh7785lcr_32bit_defconfig
+++ b/arch/sh/configs/sh7785lcr_32bit_defconfig
@@ -25,7 +25,6 @@ CONFIG_SH_SH7785LCR=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_CPU_FREQ=y
-CONFIG_CPU_FREQ_STAT_DETAILS=y
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
CONFIG_SH_CPU_FREQ=y
CONFIG_HEARTBEAT=y
diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig
index 534fcb8..f64ed8a 100644
--- a/drivers/cpufreq/Kconfig
+++ b/drivers/cpufreq/Kconfig
@@ -36,15 +36,6 @@ config CPU_FREQ_STAT
If in doubt, say N.
-config CPU_FREQ_STAT_DETAILS
- bool "CPU frequency translation statistics details"
- depends on CPU_FREQ_STAT
- help
- This will show detail CPU frequency translation table in sysfs file
- system.
-
- If in doubt, say N.
-
choice
prompt "Default CPUFreq governor"
default CPU_FREQ_DEFAULT_GOV_USERSPACE if ARM_SA1100_CPUFREQ || ARM_SA1110_CPUFREQ
diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c
index fb65dec..c774005 100644
--- a/drivers/cpufreq/cpufreq_stats.c
+++ b/drivers/cpufreq/cpufreq_stats.c
@@ -33,9 +33,7 @@ struct cpufreq_stats {
unsigned int last_index;
u64 *time_in_state;
unsigned int *freq_table;
-#ifdef CONFIG_CPU_FREQ_STAT_DETAILS
unsigned int *trans_table;
-#endif
};
static DEFINE_PER_CPU(struct cpufreq_stats *, cpufreq_stats_table);
@@ -86,7 +84,6 @@ static ssize_t show_time_in_state(struct cpufreq_policy *policy, char *buf)
return len;
}
-#ifdef CONFIG_CPU_FREQ_STAT_DETAILS
static ssize_t show_trans_table(struct cpufreq_policy *policy, char *buf)
{
ssize_t len = 0;
@@ -131,7 +128,6 @@ static ssize_t show_trans_table(struct cpufreq_policy *policy, char *buf)
return len;
}
cpufreq_freq_attr_ro(trans_table);
-#endif
cpufreq_freq_attr_ro(total_trans);
cpufreq_freq_attr_ro(time_in_state);
@@ -139,9 +135,7 @@ cpufreq_freq_attr_ro(time_in_state);
static struct attribute *default_attrs[] = {
&total_trans.attr,
&time_in_state.attr,
-#ifdef CONFIG_CPU_FREQ_STAT_DETAILS
&trans_table.attr,
-#endif
NULL
};
static struct attribute_group stats_attr_group = {
@@ -231,9 +225,7 @@ static int cpufreq_stats_create_table(struct cpufreq_policy *policy,
alloc_size = count * sizeof(int) + count * sizeof(u64);
-#ifdef CONFIG_CPU_FREQ_STAT_DETAILS
alloc_size += count * count * sizeof(int);
-#endif
stat->max_state = count;
stat->time_in_state = kzalloc(alloc_size, GFP_KERNEL);
if (!stat->time_in_state) {
@@ -242,9 +234,7 @@ static int cpufreq_stats_create_table(struct cpufreq_policy *policy,
}
stat->freq_table = (unsigned int *)(stat->time_in_state + count);
-#ifdef CONFIG_CPU_FREQ_STAT_DETAILS
stat->trans_table = stat->freq_table + count;
-#endif
j = 0;
for (i = 0; table[i].frequency != CPUFREQ_TABLE_END; i++) {
unsigned int freq = table[i].frequency;
@@ -333,9 +323,7 @@ static int cpufreq_stat_notifier_trans(struct notifier_block *nb,
spin_lock(&cpufreq_stats_lock);
stat->last_index = new_index;
-#ifdef CONFIG_CPU_FREQ_STAT_DETAILS
stat->trans_table[old_index * stat->max_state + new_index]++;
-#endif
stat->total_trans++;
spin_unlock(&cpufreq_stats_lock);
return 0;
--
1.7.12.rc2.18.g61b472e
This patch set implements out of the box support of perf tools for
persistent events. For this the kernel must provide necessary
information about existing persistent events via sysfs to userland.
Persistent events are provided by the kernel with readonly event
buffers. To allow the independent usage of the event buffers by any
process without limiting other processes, multiple users of a single
event must be handled too.
The basic concept is to use a pmu as an event container for persistent
events. The pmu registers events in sysfs and provides format and
event information for the userland. The persistent event framework
requires to add events to the pmu dynamically.
With the information in sysfs userland knows about how to setup the
perf_event attribute of a persistent event. Since a persistent event
always has the persistent flag set, a way is needed to express this in
sysfs. A new syntax is used for this. With 'attr<num>:<mask>' any bit
in the attribute structure may be set in a similar way as using
'config<num>', but <num> is an index that points to the u64 value to
change within the attribute.
For persistent events the persistent flag (bit 23 of flag field in
struct perf_event_attr) needs to be set which is expressed in sysfs
with "attr5:23". E.g. the mce_record event is described in sysfs as
follows:
/sys/bus/event_source/devices/persistent/events/mce_record:persistent,config=106
/sys/bus/event_source/devices/persistent/format/persistent:attr5:23
Note that perf tools need to support the 'attr<num>' syntax that is
added in a separate patch set. With it we are able to run perf tool
commands to read persistent events, e.g.:
# perf record -e persistent/mce_record/ sleep 10
# perf top -e persistent/mce_record/
In general the new syntax is flexible to describe with sysfs any event
to be setup by perf tools.
First patches contain also fixes and reworks made after reviewing
code. Could be applied separately.
Patches base on Boris' patches which I have rebased to latest
tip/perf/core. All patches can be found here:
git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile.git persistent-v2
I wonder if this patch set could be applied to a tip/perf topic
branch? This would avoid reposting already reviewed patches.
Note: The perf tools patch set do not need to be reposted.
-Robert
Changes for V2:
* Merged minor changes into Boris' patches
* Included Boris' patches for review
* Document attr<index> syntax in sysfs ABI
* Adding cpu check to perf_get_persistent_event_fd()
* Rebased to latest tip/perf/core
Borislav Petkov (4):
perf, ring_buffer: Use same prefix
perf: Add persistent events
perf: Add persistent event facilities
MCE: Enable persistent event
Robert Richter (10):
perf, persistent: Rework struct pers_event_desc
perf, persistent: Remove rb_put()
perf, persistent: Introduce get_persistent_event()
perf, persistent: Reworking perf_get_persistent_event_fd()
perf, persistent: Protect event lists with mutex
perf, persistent: Avoid adding identical events
perf, persistent: Implementing a persistent pmu
perf, persistent: Name each persistent event
perf, persistent: Exposing persistent events using sysfs
perf, persistent: Allow multiple users for an event
.../testing/sysfs-bus-event_source-devices-format | 43 ++-
arch/x86/kernel/cpu/mcheck/mce.c | 19 ++
include/linux/perf_event.h | 9 +-
include/uapi/linux/perf_event.h | 3 +-
kernel/events/Makefile | 2 +-
kernel/events/core.c | 56 ++--
kernel/events/internal.h | 3 +
kernel/events/persistent.c | 320 +++++++++++++++++++++
kernel/events/ring_buffer.c | 7 +-
9 files changed, 419 insertions(+), 43 deletions(-)
create mode 100644 kernel/events/persistent.c
--
1.8.1.1
also cc linaro kernel
Hi,
This patch will forward target residency information from the arm_big_little
driver to mcpm.
If multiple powerdown states are used, the vendor specific code will need a way to distinguish the intended c-state information.
I do not have TC2 hardware to verify this. Would someone be able to help
verify this change on TC2?
Thanks!
Sebastian
Sebastian Capella (1):
cpuidle: arm_big_little: route target residency to mcpm
drivers/cpuidle/arm_big_little.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--
1.7.9.5
If CPUs are marked as disabled in the devicetree, make sure they do
not exist in the system CPU information and CPU topology information.
In this case these CPUs will not be able to be added to the system later
using hot-plug. This allows a single chip with many CPUs to be easily
used in a variety of hardware devices where they may have different
actual processing requirements (eg for thermal/cost reasons).
- Change devicetree.c to ignore any cpu nodes marked as disabled,
this effectively limits the number of active cpu cores so no need
for the max_cpus=x in the chosen node.
- Change topology.c to ignore any cpu nodes marked as disabled, this
is where the scheduler would learn about big/LITTLE cores so this
effectively keeps the scheduler in sync.
Signed-off-by: James King <james.king(a)linaro.org>
---
Documentation/devicetree/bindings/arm/cpus.txt | 5 +++++
arch/arm/kernel/devtree.c | 6 ++++++
arch/arm/kernel/topology.c | 4 ++++
3 files changed, 15 insertions(+)
diff --git a/Documentation/devicetree/bindings/arm/cpus.txt b/Documentation/devicetree/bindings/arm/cpus.txt
index f32494d..9fbcbc5 100644
--- a/Documentation/devicetree/bindings/arm/cpus.txt
+++ b/Documentation/devicetree/bindings/arm/cpus.txt
@@ -45,6 +45,10 @@ For the ARM architecture every CPU node must contain the following properties:
"marvell,xsc3"
"marvell,xscale"
+And optionally set the following properties:
+
+- status: can be set to "disabled" to remove that CPU from the system CPU topology
+
Example:
cpus {
@@ -73,5 +77,6 @@ Example:
device_type = "cpu";
compatible = "arm,cortex-a7";
reg = <0x101>;
+ status = "disabled";
};
};
diff --git a/arch/arm/kernel/devtree.c b/arch/arm/kernel/devtree.c
index 5af04f6..f4ba8ee 100644
--- a/arch/arm/kernel/devtree.c
+++ b/arch/arm/kernel/devtree.c
@@ -112,6 +112,12 @@ void __init arm_dt_init_cpu_maps(void)
return;
/*
+ * Check if the cpu is marked as "disabled", if so ignore.
+ */
+ if (!of_device_is_available(cpu))
+ continue;
+
+ /*
* Duplicate MPIDRs are a recipe for disaster.
* Scan all initialized entries and check for
* duplicates. If any is found just bail out.
diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c
index f10316b..90f8fb3 100644
--- a/arch/arm/kernel/topology.c
+++ b/arch/arm/kernel/topology.c
@@ -116,6 +116,10 @@ static void __init parse_dt_topology(void)
if (cpu_eff->compatible == NULL)
continue;
+ /* Check if the cpu is marked as "disabled", if so ignore. */
+ if (!of_device_is_available(cn))
+ continue;
+
rate = of_get_property(cn, "clock-frequency", &len);
if (!rate || len != 4) {
pr_err("%s missing clock-frequency property\n",
--
1.8.1.2
Before the commit d6f346f2d2bf511c2c59176121a6e42ce60173a0, the
ARCH_NEEDS_CPU_IDLE_COUPLED option was wrongly not depending on the CPU_IDLE
and the Kconfig for OMAP / TEGRA was not checking this dependency when setting
the option.
With this patch, the ARCH_NEEDS_CPU_IDLE_COUPLED has been moved under the
CPU_IDLE option. The dependency has been fixed in the relevant arch's Kconfig.
Signed-off-by: Daniel Lezcano <daniel.lezcano(a)linaro.org>
---
arch/arm/mach-omap2/Kconfig | 2 +-
arch/arm/mach-tegra/Kconfig | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index f49cd51..831e89e 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -83,7 +83,7 @@ config ARCH_OMAP4
depends on ARCH_OMAP2PLUS
depends on ARCH_MULTI_V7
select ARCH_HAS_OPP
- select ARCH_NEEDS_CPU_IDLE_COUPLED if SMP
+ select ARCH_NEEDS_CPU_IDLE_COUPLED if (SMP && CPU_IDLE)
select ARM_CPU_SUSPEND if PM
select ARM_ERRATA_720789
select ARM_GIC
diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig
index 84d72fc..04c6221 100644
--- a/arch/arm/mach-tegra/Kconfig
+++ b/arch/arm/mach-tegra/Kconfig
@@ -23,7 +23,7 @@ menu "NVIDIA Tegra options"
config ARCH_TEGRA_2x_SOC
bool "Enable support for Tegra20 family"
- select ARCH_NEEDS_CPU_IDLE_COUPLED if SMP
+ select ARCH_NEEDS_CPU_IDLE_COUPLED if (SMP && CPU_IDLE)
select ARM_ERRATA_720789
select ARM_ERRATA_754327 if SMP
select ARM_ERRATA_764369 if SMP
--
1.7.9.5
This patch series does the following:
1) Factors out possible common code, unifies the clk strutures used
for PLL35xx & PLL36xx and usues clk->base instead of clk->con0
2) Defines a common rate_table which will contain recommended p, m, s and k
values for supported rates that needs to be changed for changing
corresponding PLL's rate
3) Adds set_rate() and round_rate() clk_ops for PLL35xx and PLL36xx
changes since v1:
- removed sorting and bsearch
- modified the definition of struct "samsung_pll_rate_table"
- added generic round_rate()
- rectified the ops assignment for "rate table passed as NULL"
during PLL registration
Is rebased on branch kgene's "for-next"
https://git.kernel.org/cgit/linux/kernel/git/kgene/linux-samsung.git/log/?h…
And tested these patch on chromebook for EPLL settings for Audio on our chrome tree.
Vikas Sajjan (2):
clk: samsung: Add set_rate() clk_ops for PLL36xx
clk: samsung: Add EPLL and VPLL freq table for exynos5250 SoC
Yadwinder Singh Brar (3):
clk: samsung: Use clk->base instead of directly using clk->con0 for
PLL3xxx
clk: samsung: Add support to register rate_table for PLL3xxx
clk: samsung: Add set_rate() clk_ops for PLL35xx
drivers/clk/samsung/clk-exynos4.c | 10 +-
drivers/clk/samsung/clk-exynos5250.c | 30 +++--
drivers/clk/samsung/clk-pll.c | 226 ++++++++++++++++++++++++++++++----
drivers/clk/samsung/clk-pll.h | 33 ++++-
4 files changed, 260 insertions(+), 39 deletions(-)
--
1.7.9.5
=== Highlights ===
* Sent my 3.11 queue to Thomas
* Reviewed/Looked at queueing generic sched_clock logic from arch/arm
* Strange 3.9.4 regression from last week ended up being a gcc issue
* Reviewed blueprints and sent out weekly android upstreaming mail
* Dhaval G. (Mozilla) is interested in helping with Volatile Ranges, so
spent some time bringing him up to speed on volatile range work
* Continued some older discussions with Minchan on volatile ranges
* Started re-factoring volatile ranges patch to make shared volatility
the default and private an optimization
* Worked with Zoran on some new tasks (pushing wakeup_source driver
enablement upstream)
* Synced with AntonV on memcg pressure levels and userland low-memory
killer.
* Sent mail to Android devs to get their thoughts on userland low-memory
killer
* Pinged maintainers on KDB kiosk mode
=== Plans ===
* Continued volatile range work
* Send out refactored ION patches and comments to Google devs
* Finish queuing items for 3.11
* LSK / upstream review & mentoring discussions
=== Issues ===
* N/A