Hi all,
I was just discussing IPv6 with Philip Colmer, our new IT Services Manager (cc'd on this mail), and it strikes me that we should at least be considering dual running at some point in the future, i.e. providing both v4 and v6. I'm not clear what the ramifications are, or as yet whether Zen will support it. Philip has experience with this, and seems to remember that Zen do support it, but I'll bang an e-mail out to them to check.
The reason for this e-mail is to start a discussion as to whether we think it's worth raising a BP, or if we can ignore this issue.
Thoughts, comments and brickbats welcome.
Thanks
Dave
Calendar Week 50: Here is test result summary for Linux Linaro ubuntu
Quantal image on following boards:
1) ARM Versatile Express A9;
2) Samsung Origen;
3) TI Panda 4430;
4) TI Panda 4460;
5) ST Ericsson Snowball.
Synopsis: All Linux Linaro ubuntu Quantal builds for above boards are
available. No network connection on Samsung Origen; ST Ericsson Snowball
boots failed. Device Tree is unavailable except on Samsung Origen.
1. ARM Versatile Express A9 + Linux Linaro Quantal (Column D):
https://docs.google.com/a/linaro.org/spreadsheet/ccc?key=0AroPySpr4FnEdFNmV…
Only "Halt" & "Device Tree" test failed, all other features work well.
2. Samsung Origen + Linux Linaro Quantal (Column C):
https://docs.google.com/a/linaro.org/spreadsheet/ccc?key=0AroPySpr4FnEdEowN…
No network connection in this image, neither Ethernet nor WiFi works. Also,
"reboot" & "halt" doesn't work. Power Management test would hang system
when run test "cpuhotplug_02".
3. TI Panda 4430 + Linux Linaro Quantal (Column D):
https://docs.google.com/a/linaro.org/spreadsheet/ccc?key=0AroPySpr4FnEdEwwZ…
Data streaming failed in DS-5 due to Gator version mismatch. Device Tree is
unavailable, the directory "/proc/device-tree" is empty. All other features
work well.
4. TI Panda 4460 + Linux Linaro Quantal (Column D):
https://docs.google.com/a/linaro.org/spreadsheet/ccc?key=0AroPySpr4FnEdEwwZ…
Exactly same status as TI Panda 4430 test result - "Device Tree" & "DS5
Data Streaming" test failed.
5. ST Ericsson Snowball + Linux Linaro Quantal (Column D):
https://docs.google.com/a/linaro.org/spreadsheet/ccc?key=0AroPySpr4FnEdFJ4X…
Same as last week, system boots failed. This blocked all other test cases.
For the previous week (Calendar week 49) summary, please refer to
attachment.
Thank you.
Best Regards
Botao Sun
QA Team WiKi Page: https://wiki.linaro.org/Platform/QA
On 10/17/2012 12:39 AM, Julius Werner wrote:
> When cpuidle drivers do not supply explicit power_usage values,
> cpuidle/driver.c inserts dummy values instead. When a running processor
> dynamically gains new C-states (e.g. after ACPI events), the power_usage
> values of those states will stay uninitialized, and cpuidle governors
> will never choose to enter them.
>
> This patch moves the dummy value initialization from
> cpuidle_register_driver to cpuidle_enable_device, which drivers such as
> acpi/processor_idle.c will call again when they add or remove C-states.
> Tested and verified on an Acer AC700 Chromebook, which supports the C3
> state only when it switches from AC to battery power.
>
> Signed-off-by: Julius Werner <jwerner(a)chromium.org>
> ---
This is specific to the acpi and should be handled in the
processor_idle.c file instead of the cpuidle core code.
Could be the function 'acpi_processor_cst_has_changed' the right place
to set a dummy power value for the power in the new C-state ?
> drivers/cpuidle/cpuidle.c | 24 ++++++++++++++++++++++++
> drivers/cpuidle/driver.c | 25 -------------------------
> 2 files changed, 24 insertions(+), 25 deletions(-)
>
> diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
> index 7f15b85..bef3a31 100644
> --- a/drivers/cpuidle/cpuidle.c
> +++ b/drivers/cpuidle/cpuidle.c
> @@ -298,6 +298,28 @@ static void poll_idle_init(struct cpuidle_driver *drv)
> static void poll_idle_init(struct cpuidle_driver *drv) {}
> #endif /* CONFIG_ARCH_HAS_CPU_RELAX */
>
> +static void set_power_states(struct cpuidle_driver *drv)
> +{
> + int i;
> +
> + /*
> + * cpuidle driver should set the drv->power_specified bit
> + * before registering if the driver provides
> + * power_usage numbers.
> + *
> + * If power_specified is not set,
> + * we fill in power_usage with decreasing values as the
> + * cpuidle code has an implicit assumption that state Cn
> + * uses less power than C(n-1).
> + *
> + * With CONFIG_ARCH_HAS_CPU_RELAX, C0 is already assigned
> + * an power value of -1. So we use -2, -3, etc, for other
> + * c-states.
> + */
> + for (i = CPUIDLE_DRIVER_STATE_START; i < drv->state_count; i++)
> + drv->states[i].power_usage = -1 - i;
> +}
> +
> /**
> * cpuidle_enable_device - enables idle PM for a CPU
> * @dev: the CPU
> @@ -330,6 +352,8 @@ int cpuidle_enable_device(struct cpuidle_device *dev)
> cpuidle_enter_tk : cpuidle_enter;
>
> poll_idle_init(drv);
> + if (!drv->power_specified)
> + set_power_states(drv);
>
> if ((ret = cpuidle_add_state_sysfs(dev)))
> return ret;
> diff --git a/drivers/cpuidle/driver.c b/drivers/cpuidle/driver.c
> index 87db387..caaed27 100644
> --- a/drivers/cpuidle/driver.c
> +++ b/drivers/cpuidle/driver.c
> @@ -18,28 +18,6 @@ static struct cpuidle_driver *cpuidle_curr_driver;
> DEFINE_SPINLOCK(cpuidle_driver_lock);
> int cpuidle_driver_refcount;
>
> -static void set_power_states(struct cpuidle_driver *drv)
> -{
> - int i;
> -
> - /*
> - * cpuidle driver should set the drv->power_specified bit
> - * before registering if the driver provides
> - * power_usage numbers.
> - *
> - * If power_specified is not set,
> - * we fill in power_usage with decreasing values as the
> - * cpuidle code has an implicit assumption that state Cn
> - * uses less power than C(n-1).
> - *
> - * With CONFIG_ARCH_HAS_CPU_RELAX, C0 is already assigned
> - * an power value of -1. So we use -2, -3, etc, for other
> - * c-states.
> - */
> - for (i = CPUIDLE_DRIVER_STATE_START; i < drv->state_count; i++)
> - drv->states[i].power_usage = -1 - i;
> -}
> -
> /**
> * cpuidle_register_driver - registers a driver
> * @drv: the driver
> @@ -58,9 +36,6 @@ int cpuidle_register_driver(struct cpuidle_driver *drv)
> return -EBUSY;
> }
>
> - if (!drv->power_specified)
> - set_power_states(drv);
> -
> cpuidle_curr_driver = drv;
>
> spin_unlock(&cpuidle_driver_lock);
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
Hi all,
Just a warning that there may be a little disruption in LAVA today because I'm switching over to a wider IP address space in the lab. If all goes according to plan, there should be nothing noticeable, but just to be on the safe side I'm warning you. For the moment, all boards will be offline, but the scheduler will still be running and queuing jobs for when they come back.
Thanks
Dave
Provide a -O option to specify dir to put generated .config
Signed-off-by: Zhangfei Gao <zhangfei.gao(a)linaro.org>
Tested-by: Jon Medhurst (Tixy) <tixy(a)linaro.org>
---
scripts/kconfig/merge_config.sh | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh
index 974d5cb..9ad5744 100755
--- a/scripts/kconfig/merge_config.sh
+++ b/scripts/kconfig/merge_config.sh
@@ -32,11 +32,13 @@ usage() {
echo " -m only merge the fragments, do not execute the make command"
echo " -n use allnoconfig instead of alldefconfig"
echo " -r list redundant entries when merging fragments"
+ echo " -O dir to put generated output files"
}
MAKE=true
ALLTARGET=alldefconfig
WARNREDUN=false
+OUTPUT=.
while true; do
case $1 in
@@ -59,6 +61,16 @@ while true; do
shift
continue
;;
+ "-O")
+ if [ -d $2 ];then
+ OUTPUT=$2
+ else
+ echo "output directory $2 does not exist" 1>&2
+ exit 1
+ fi
+ shift 2
+ continue
+ ;;
*)
break
;;
@@ -100,7 +112,7 @@ for MERGE_FILE in $MERGE_LIST ; do
done
if [ "$MAKE" = "false" ]; then
- cp $TMP_FILE .config
+ cp $TMP_FILE $OUTPUT/.config
echo "#"
echo "# merged configuration written to .config (needs make)"
echo "#"
@@ -111,14 +123,14 @@ fi
# Use the merged file as the starting point for:
# alldefconfig: Fills in any missing symbols with Kconfig default
# allnoconfig: Fills in any missing symbols with # CONFIG_* is not set
-make KCONFIG_ALLCONFIG=$TMP_FILE $ALLTARGET
+make KCONFIG_ALLCONFIG=$TMP_FILE O=$OUTPUT $ALLTARGET
# Check all specified config values took (might have missed-dependency issues)
for CFG in $(sed -n "$SED_CONFIG_EXP" $TMP_FILE); do
REQUESTED_VAL=$(grep -w -e "$CFG" $TMP_FILE)
- ACTUAL_VAL=$(grep -w -e "$CFG" .config)
+ ACTUAL_VAL=$(grep -w -e "$CFG" $OUTPUT/.config)
if [ "x$REQUESTED_VAL" != "x$ACTUAL_VAL" ] ; then
echo "Value requested for $CFG not in final .config"
echo "Requested value: $REQUESTED_VAL"
--
1.7.9.5
[Already Pulled by Andrey]
Hi Guys,
This is an formal announcement of v13 release. Updates:
- Created more branches with same stuff to keep topics separated.
- Applied additional patch from Morten to task-placement-v2 branch
--------------x---------------------x--------------------
The following changes since commit 77b67063bb6bce6d475e910d3b886a606d0d91f7:
Linux 3.7-rc5 (2012-11-11 13:44:33 +0100)
are available in the git repository at:
git://git.linaro.org/arm/big.LITTLE/mp.git big-LITTLE-MP-master-v13
for you to fetch changes up to fba4f1ff31d4303efa7270936930c4e01931172a:
Merge branches 'arm-multi_pmu_v2', 'hw-bkp-v7.1-debug-v1',
'task-placement-v2-sysfs', 'misc-patches', 'config-fragments' and
'sched-pack-small-tasks-v1-arm' into big-LITTLE-MP-master-v13
(2012-12-07 20:09:17 +0530)
----------------------------------------------------------------
Ben Segall (1):
sched: Maintain per-rq runnable averages
Chris Redpath (2):
ARM: Experimental Frequency-Invariant Load Scaling Patch
ARM: Fix build breakage when big.LITTLE.conf is not used.
Dietmar Eggemann (1):
ARM: hw_breakpoint: v7.1 self-hosted debug powerdown support
Jon Medhurst (1):
ARM: sched: Avoid empty 'slow' HMP domain
Liviu Dudau (2):
linaro/configs: big-LITTLE-MP: Enable the new tunable sysfs
interface by default.
Revert "sched: secure access to other CPU statistics"
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
Morten Rasmussen (15):
sched: entity load-tracking load_avg_ratio
sched: Task placement for heterogeneous systems based on task
load-tracking
sched: Forced task migration on heterogeneous systems
sched: Introduce priority-based task migration filter
ARM: Add HMP scheduling support for ARM architecture
ARM: sched: Use device-tree to provide fast/slow CPU list for HMP
ARM: sched: Setup SCHED_HMP domains
sched: Add ftrace events for entity load-tracking
sched: Add HMP task migration ftrace event
sched: SCHED_HMP multi-domain task migration control
sched: Enable HMP priority filter by default
sched: Only down migrate low priority tasks if allowed by affinity mask
linaro/configs: Enable HMP priority filter by default
ARM: TC2: Re-enable SD_SHARE_POWERLINE
sched: Basic global balancing support for HMP
Olivier Cozette (1):
ARM: Change load tracking scale using sysfs
Paul Turner (15):
sched: Track the runnable average on a per-task entity basis
sched: Aggregate load contributed by task entities on parenting cfs_rq
sched: Maintain the load contribution of blocked entities
sched: Add an rq migration call-back to sched_class
sched: Account for blocked load waking back up
sched: Aggregate total task_group load
sched: Compute load contribution by a group entity
sched: Normalize tg load contributions against runnable time
sched: Maintain runnable averages across throttled periods
sched: Replace update_shares weight distribution with per-entity
computation
sched: Refactor update_shares_cpu() -> update_blocked_avgs()
sched: Update_cfs_shares at period edge
sched: Make __update_entity_runnable_avg() fast
sched: Introduce temporary FAIR_GROUP_SCHED dependency for load-tracking
sched: implement usage tracking
Peter Zijlstra (1):
sched: Describe CFS load-balancer
Sudeep KarkadaNagesha (9):
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
Thomas Gleixner (1):
genirq: Add default affinity mask command line option
Vincent Guittot (7):
sched: add a new SD SHARE_POWERLINE flag for sched_domain
sched: pack small tasks
sched: secure access to other CPU statistics
sched: pack the idle load balance
ARM: sched: clear SD_SHARE_POWERLINE
sched: pack small tasks: fix printk formating
sched: pack small tasks: fix update packing domain
Viresh Kumar (5):
Revert "sched: Introduce temporary FAIR_GROUP_SCHED dependency
for load-tracking"
configs: Add config fragments for big LITTLE MP
linaro/configs: Update big LITTLE MP fragment for task placement work
config-frag/big-LITTLE: Use device-tree to provide fast/slow CPU
list for HMP
Merge branches 'arm-multi_pmu_v2', 'hw-bkp-v7.1-debug-v1',
'task-placement-v2-sysfs', 'misc-patches', 'config-fragments' and
'sched-pack-small-tasks-v1-arm' into big-LITTLE-MP-master-v13
Will Deacon (2):
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 | 3 +
Documentation/kernel-parameters.txt | 9 +
arch/arm/Kconfig | 85 ++
arch/arm/include/asm/perf_event.h | 5 +
arch/arm/include/asm/pmu.h | 40 +-
arch/arm/include/asm/topology.h | 34 +
arch/arm/kernel/hw_breakpoint.c | 57 +
arch/arm/kernel/perf_event.c | 103 +-
arch/arm/kernel/perf_event_cpu.c | 169 +-
arch/arm/kernel/perf_event_v6.c | 130 +-
arch/arm/kernel/perf_event_v7.c | 295 ++--
arch/arm/kernel/perf_event_xscale.c | 161 +-
arch/arm/kernel/topology.c | 125 ++
arch/ia64/include/asm/topology.h | 1 +
arch/tile/include/asm/topology.h | 1 +
include/linux/sched.h | 29 +
include/linux/topology.h | 3 +
include/trace/events/sched.h | 153 ++
kernel/irq/irqdesc.c | 21 +-
kernel/sched/core.c | 16 +
kernel/sched/debug.c | 39 +-
kernel/sched/fair.c | 2036 +++++++++++++++++++++++--
kernel/sched/sched.h | 65 +-
linaro/configs/big-LITTLE-MP.conf | 13 +
24 files changed, 3037 insertions(+), 556 deletions(-)
create mode 100644 linaro/configs/big-LITTLE-MP.conf
Adding Philip this time. :)
Begin forwarded message:
> From: "Zen - Technical Support" <support(a)zen.co.uk>
> Subject: RE: IPv6 support [5405065:4109486]
> Date: 10 December 2012 12:17:28 GMT
> To: "Dave Pigott" <dave.pigott(a)linaro.org>
>
> Hello,
>
> The Zen core network has not yet had IPv6 turned on which would give you a native IPv6 connection as yet. Although our network could handle IPv6 Our admin systems are not yet fully compliant.
>
> You can however set up a 6in4 tunnel using a provider such as sixxs or hurricane electric which would give two-way IPv6 connectivity.
>
>
> David Flint
> Service Support Consultant
> Zen Internet
> T: 0845 058 9009
> F: 0845 058 9005
> W: http://www.zen.co.uk
>
>
>> -----Original Message-----
>> From: "Dave Pigott" <dave.pigott(a)linaro.org>
>> Received: 10/12/2012 10:12
>> To: support(a)zen.co.uk
>> Subject: RE: IPv6 support
>>
>> Hi,
>>
>> Just wondering if our leased line supports IPv6 or not? We would like to support both v4 and v6 if at all possible.
>>
>> Kind regards
>>
>> Dave Pigott
>
> ------------------
> Take a look inside and explore our new state of the art, award-winning Data Centre -http://www.zen.co.uk/business/default.aspx?page=11592
>
> Please consider your environmental responsibility before printing this email.
>
> This message is private and confidential. If you have received this message in error please notify us and remove it from your system.
>
> Zen Internet Limited may monitor email traffic data to manage billing, to handle customer enquiries and for the prevention and detection of fraud. We may also monitor the content of emails sent to and/or from Zen Internet Limited for the purposes of security, staff training and to monitor quality of service.
>
> Zen Internet Limited is registered in England and Wales
> Sandbrook Park, Sandbrook Way, Rochdale OL11 1RY
> Company No. 03101568
> VAT Reg No. 686 0495 01
FYI
Begin forwarded message:
> From: "Zen - Technical Support" <support(a)zen.co.uk>
> Subject: RE: IPv6 support [5405065:4109486]
> Date: 10 December 2012 12:17:28 GMT
> To: "Dave Pigott" <dave.pigott(a)linaro.org>
>
> Hello,
>
> The Zen core network has not yet had IPv6 turned on which would give you a native IPv6 connection as yet. Although our network could handle IPv6 Our admin systems are not yet fully compliant.
>
> You can however set up a 6in4 tunnel using a provider such as sixxs or hurricane electric which would give two-way IPv6 connectivity.
>
>
> David Flint
> Service Support Consultant
> Zen Internet
> T: 0845 058 9009
> F: 0845 058 9005
> W: http://www.zen.co.uk
>
>
>> -----Original Message-----
>> From: "Dave Pigott" <dave.pigott(a)linaro.org>
>> Received: 10/12/2012 10:12
>> To: support(a)zen.co.uk
>> Subject: RE: IPv6 support
>>
>> Hi,
>>
>> Just wondering if our leased line supports IPv6 or not? We would like to support both v4 and v6 if at all possible.
>>
>> Kind regards
>>
>> Dave Pigott
>
> ------------------
> Take a look inside and explore our new state of the art, award-winning Data Centre -http://www.zen.co.uk/business/default.aspx?page=11592
>
> Please consider your environmental responsibility before printing this email.
>
> This message is private and confidential. If you have received this message in error please notify us and remove it from your system.
>
> Zen Internet Limited may monitor email traffic data to manage billing, to handle customer enquiries and for the prevention and detection of fraud. We may also monitor the content of emails sent to and/or from Zen Internet Limited for the purposes of security, staff training and to monitor quality of service.
>
> Zen Internet Limited is registered in England and Wales
> Sandbrook Park, Sandbrook Way, Rochdale OL11 1RY
> Company No. 03101568
> VAT Reg No. 686 0495 01
Hi Rafael and other cpufreq masters,
I am really not sure if this patch is a HACK or a valid solution :)
Please have a look.
Setup:
-----
- ARM big LITTLE Platform with 5 cpus. cpus 2, 3 & 4 share clock and hence are
part of policy->cpus. cpus 0 & 1 share clock but they aren't discussed here.
- Interactive governor: I know its not mainlined and will never be. Problem
should be same with all the governors we have. So, problem is not really
governor dependent. I have added few prints at start/stop cases of governor,
to see what policy->cpus is set to.
Problem Statement:
-----------------
There are many issues :(
1) I couldn't understand what we really want the value of policy->cpus be? Only
the online cpus sharing clock? or all the possible cpus sharing clock?
When we offline a cpu, we remove it from cpus field: cpumask_clear_cpu(cpu, data->cpus);
Which shows that it is mask of online cpus only. But there are many places
checking if a cpu is online or not (cpu in policy->cpus) in cpufreq.c. Which
shows something else.
2) Kernel crashes when hot-unplugging cpus
When we do: for i in 2 3 4; do echo 0 > /sys/devices/system/cpu/cpu$i/online; done
We get:
cpufreq_governor_interactive: CPUFREQ_GOV_STOP cpu 2 policy->cpus 2-4
cpufreq_vexpress: CPUFreq for CPU 3 initialized
cpufreq_governor_interactive: CPUFREQ_GOV_START cpu 3 policy->cpus 2-4
CPU2: shutdown
cpufreq_governor_interactive: CPUFREQ_GOV_STOP cpu 3 policy->cpus 3-4
cpufreq_vexpress: CPUFreq for CPU 4 initialized
cpufreq_governor_interactive: CPUFREQ_GOV_START cpu 4 policy->cpus 2-4
And then crash from interactive governor.
Note the following lines:
------------------------
cpufreq_governor_interactive: CPUFREQ_GOV_STOP cpu 2 policy->cpus 2-4
cpufreq_governor_interactive: CPUFREQ_GOV_START cpu 3 policy->cpus 2-4
cpufreq_governor_interactive: CPUFREQ_GOV_STOP cpu 3 policy->cpus 3-4
cpufreq_governor_interactive: CPUFREQ_GOV_START cpu 4 policy->cpus 2-4
So the governor is always started for CPUs 2 through 4 despite the fact
that CPU 2 is removed. This makes the governor unstable due to wrong info
passed.
FIX: keep only online cpus in policy->cpus
---
3) With above issue solved, i tried to run the same stuff again and look what i
got:
cpufreq_governor_interactive: CPUFREQ_GOV_STOP cpu 2 policy->cpus 2-4
cpufreq_vexpress: CPUFreq for CPU 3 initialized
cpufreq_governor_interactive: CPUFREQ_GOV_START cpu 3 policy->cpus 2-4
CPU2: shutdown
a) Because cpu 2 is still not completely hot unplugged and is still present in
cpu_online_mask.
b) If we try to remove cpu 3, governor wouldn't be notified of it, because cpu 3
wasn't policy->cpu.
FIX: Stop/Start governor on every non policy->cpu removal
---
4) Hot unplug is fine now, but not hotplug :(
for i in 2 3 4; do echo 1 > /sys/devices/system/cpu/cpu$i/online; done
CPU2: Booted secondary processor
cpufreq_vexpress: CPUFreq for CPU 2 initialized
cpufreq_governor_interactive: CPUFREQ_GOV_START cpu 2 policy->cpus 2
CPU3: Booted secondary processor
cpufreq_vexpress: CPUFreq for CPU 3 initialized
CPU4: Booted secondary processor
cpufreq_vexpress: CPUFreq for CPU 4 initialized
Hmmm, Governor is not informed about 3 and 4. :(
FIX: Stop/Start governor on every managed_policy cpu, i.e. cpu for which
--- policy struct exists
Please share your comments, i know there would be many :)
Signed-off-by: Viresh Kumar <viresh.kumar(a)linaro.org>
---
drivers/cpufreq/cpufreq.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 0c3e29a..69bd739 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -749,11 +749,16 @@ static int cpufreq_add_dev_policy(unsigned int cpu,
return -EBUSY;
}
+ __cpufreq_governor(managed_policy, CPUFREQ_GOV_STOP);
+
spin_lock_irqsave(&cpufreq_driver_lock, flags);
cpumask_copy(managed_policy->cpus, policy->cpus);
per_cpu(cpufreq_cpu_data, cpu) = managed_policy;
spin_unlock_irqrestore(&cpufreq_driver_lock, flags);
+ __cpufreq_governor(managed_policy, CPUFREQ_GOV_START);
+ __cpufreq_governor(managed_policy, CPUFREQ_GOV_LIMITS);
+
pr_debug("CPU already managed, adding link\n");
ret = sysfs_create_link(&dev->kobj,
&managed_policy->kobj,
@@ -968,6 +973,13 @@ static int cpufreq_add_dev(struct device *dev, struct subsys_interface *sif)
pr_debug("initialization failed\n");
goto err_unlock_policy;
}
+
+ /*
+ * affected cpus must always be the one, which are online. We aren't
+ * managing offline cpus here.
+ */
+ cpumask_and(policy->cpus, policy->cpus, cpu_online_mask);
+
policy->user_policy.min = policy->min;
policy->user_policy.max = policy->max;
@@ -1057,8 +1069,13 @@ static int __cpufreq_remove_dev(struct device *dev, struct subsys_interface *sif
*/
if (unlikely(cpu != data->cpu)) {
pr_debug("removing link\n");
+ __cpufreq_governor(data, CPUFREQ_GOV_STOP);
cpumask_clear_cpu(cpu, data->cpus);
spin_unlock_irqrestore(&cpufreq_driver_lock, flags);
+
+ __cpufreq_governor(data, CPUFREQ_GOV_START);
+ __cpufreq_governor(data, CPUFREQ_GOV_LIMITS);
+
kobj = &dev->kobj;
cpufreq_cpu_put(data);
unlock_policy_rwsem_write(cpu);
--
1.7.12.rc2.18.g61b472e
Hi Viresh,
Here is a patch that introduces global load balancing on top of the existing HMP
patch set. It depends on the HMP patches already present in your task-placement-v2
branch. It can be applied on top of the HMP sysfs patches if needed. The fix should
be trivial.
Could you include in the MP branch for the 12.12 release? Testing with sysbench and
coremark show significant performance improvements for parallel workloads as all
cpus can now be used for cpu intensive tasks.
Thanks,
Morten
Morten Rasmussen (1):
sched: Basic global balancing support for HMP
kernel/sched/fair.c | 101 +++++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 97 insertions(+), 4 deletions(-)
--
1.7.9.5