aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-07-22perf tools: Revert regression in configuration of Python supportlsk-13.07Michael Witten
Among other things, the following: commit 31160d7feab786c991780d7f0ce2755a469e0e5e Date: Tue Jan 8 16:22:36 2013 -0500 perf tools: Fix GNU make v3.80 compatibility issue attempts to aid the user by tapping into an existing error message, as described in the commit message: ... Also fix an issue where _get_attempt was called with only one argument. This prevented the error message from printing the name of the variable that can be used to fix the problem. or more precisely: -$(if $($(1)),$(call _ge_attempt,$($(1)),$(1)),$(call _ge_attempt,$(2))) +$(if $($(1)),$(call _ge_attempt,$($(1)),$(1)),$(call _ge_attempt,$(2),$(1))) However, The "missing" argument was in fact missing on purpose; it's absence is a signal that the error message should be skipped, because the failure would be due to the default value, not any user-supplied value. This can be seen in how `_ge_attempt' uses `gea_err' (in the config/utilities.mak file): _ge_attempt = $(if $(get-executable),$(get-executable),$(_gea_warn)$(call _gea_err,$(2))) _gea_warn = $(warning The path '$(1)' is not executable.) _gea_err = $(if $(1),$(error Please set '$(1)' appropriately)) That is, because the argument is no longer missing, the value `$(1)' (associated with `_gea_err') always evaluates to true, thus always triggering the error condition that is meant to be reserved for only the case when a user explicitly supplies an invalid value. Concretely, the result is a regression in the Makefile's configuration of python support; rather than gracefully disable support when the relevant executables cannot be found according to default values, the build process halts in error as though the user explicitly supplied the values. This new commit simply reverts the offending one-line change. Reported-by: Pekka Enberg <penberg@kernel.org> Link: http://lkml.kernel.org/r/CAOJsxLHv17Ys3M7P5q25imkUxQW6LE_vABxh1N3Tt7Mv6Ho4iw@mail.gmail.com Signed-off-by: Michael Witten <mfwitten@gmail.com> (cherry picked from commit a363a9da65d253fa7354ce5fd630f4f94df934cc)
2013-07-19Merge remote-tracking branch 'lsk/v3.10/topic/tc2' into linux-linaro-lskMark Brown
2013-07-19Merge branch 'lsk-3.10-iks-cpufreq' of ↵Mark Brown
git://git.linaro.org/people/tixy/kernel into lsk-v3.10-tc2
2013-07-19cpufreq/arm_big_little.c: Fixing non-terminated stringMathieu J. Poirier
When declaring char name[9] = "cluster"; name[7] is equal to the string termination character '\0'. But later on doing: name[7] = cluster_id + '0'; clobbers the termination character, leaving non terminated strings in the system and potentially causing undertermined behavior. By initialising name[9] to "clusterX" the 8th character is set to '\0' and affecting the 7th character with the cluster number doesn't overwite anything. Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> [ np: The C standard says that the reminder of an initialized array of a known size should be initialized to zero and therefore this patch is unneeded, however this patch makes the intent more explicit to others reading the code. ] Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
2013-07-19cpufreq: arm_big_little: Don't destroy/create freq table/clk for every cpu ↵Viresh Kumar
on/off When a cpu goes down, exit would be called for it. Similarly for every cpu up init would be called. This would result in same freq table and clk structure to get freed/allocated again. There is no way for freq table/clk structures to change between these calls. Also, when we disable switcher, firstly cpufreq unregister would be called and hence exit for all cpus and then register would be called, i.e. init would be called. For saving time/energy for both cases, lets not free table/clk until module exit is not done. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2013-07-19cpufreq: arm_big_little: Unregister/register cpufreq driver with switcher ↵Nicolas Pitre
notifiers Cpufreq driver must be unregistered/registered on switcher on/off to get correct freq tables for all cpus. This patch does it. Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
2013-07-19cpufreq: arm_big_little: add in-kernel switching(IKS) supportViresh Kumar
This patch adds IKS (In Kernel Switcher) support to cpufreq driver. This creates separate freq table for A7-A15 cpu pair. A7 frequency is virtualized and is halved, so that it touches boundaries with A7 frequencies. Based on Earlier Work from Sudeep. Signed-off-by: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2013-07-19cpufreq: cpufreq_stats: Register for bL_switcher notifiersViresh Kumar
cpufreq_stat has registered notifiers with both cpufreq and cpu core. It adds cpu/cpu0/cpufreq/stats/ directory with a notifier of cpufreq CPUFREQ_NOTIFY and removes this directory with a notifier to cpu core. On bL_switcher enable/disable, cpufreq drivers notifiers gets called and they call cpufreq_unregister(), followed by cpufreq_register(). For unregister stats directories per cpu aren't removed, because cpu never went to dead state and cpu notifier isn't called. When cpufreq_register() is called, we try to add these directories again and that simply fails, as directories were already present. Fix these issues by registering cpufreq_stats too with bL_switcher notifiers, so that they get unregistered and registered on switcher enable/disable. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2013-07-19ARM: IKS: Disable IKS by default when HMP is enabledMark Brown
Reported-by: Jon Medhurst <tixy@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-19Merge tag 'v3.10.1' into linux-linaro-lskMark Brown
This is the 3.10.1 stable release
2013-07-18Merge remote-tracking branch 'lsk/v3.10/topic/tc2' into linux-linaro-lskMark Brown
Conflicts (look like simple add/add stuff): arch/arm/Kconfig arch/arm/common/Makefile
2013-07-18Merge remote-tracking branch 'lsk/v3.10/topic/big.LITTLE' into linux-linaro-lskMark Brown
2013-07-18Merge remote-tracking branch 'lsk/v3.10/topic/iks' into linux-linaro-lskMark Brown
2013-07-18Merge remote-tracking branch 'lsk/v3.10/topic/pe-wq' into linux-linaro-lskMark Brown
2013-07-18Merge remote-tracking branch 'lsk/v3.10/topic/configs' into linux-linaro-lskMark Brown
2013-07-18configs: Add config fragments for big LITTLE IKSNaresh Kamboju
This patch adds config fragments used to enable most of the features used by big LITTLE IKS. Signed-off-by: Naresh Kamboju <naresh.kamboju@linaro.org> (cherry picked from commit 34319fb8e6f1e9c13e379383c8d1311f6b7e0cd2) Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-18fbcon: queue work on power efficient wqViresh Kumar
fbcon uses workqueues and it has no real dependency of scheduling these on the cpu which scheduled them. On a idle system, it is observed that and idle cpu wakes up many times just to service this work. It would be better if we can schedule it on a cpu which the scheduler believes to be the most appropriate one. This patch replaces system_wq with system_power_efficient_wq. Cc: Dave Airlie <airlied@redhat.com> Cc: linux-fbdev@vger.kernel.org Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Tejun Heo <tj@kernel.org> (cherry picked from commit a85f1a41f020bc2c97611060bcfae6f48a1db28d) Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-18block: queue work on power efficient wqViresh Kumar
Block layer uses workqueues for multiple purposes. There is no real dependency of scheduling these on the cpu which scheduled them. On a idle system, it is observed that and idle cpu wakes up many times just to service this work. It would be better if we can schedule it on a cpu which the scheduler believes to be the most appropriate one. This patch replaces normal workqueues with power efficient versions. Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Tejun Heo <tj@kernel.org> (cherry picked from commit 695588f9454bdbc7c1a2fbb8a6bfdcfba6183348) Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-18PHYLIB: queue work on system_power_efficient_wqViresh Kumar
Phylib uses workqueues for multiple purposes. There is no real dependency of scheduling these on the cpu which scheduled them. On a idle system, it is observed that and idle cpu wakes up many times just to service this work. It would be better if we can schedule it on a cpu which the scheduler believes to be the most appropriate one. This patch replaces system_wq with system_power_efficient_wq for PHYLIB. Cc: David S. Miller <davem@davemloft.net> Cc: netdev@vger.kernel.org Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Tejun Heo <tj@kernel.org> (cherry picked from commit bbb47bdeae756f04b896b55b51f230f3eb21f207) Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-18workqueue: Add system wide power_efficient workqueuesViresh Kumar
This patch adds system wide workqueues aligned towards power saving. This is done by allocating them with WQ_UNBOUND flag if 'wq_power_efficient' is set to 'true'. tj: updated comments a bit. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Tejun Heo <tj@kernel.org> (cherry picked from commit 0668106ca3865ba945e155097fb042bf66d364d3) Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-18workqueues: Introduce new flag WQ_POWER_EFFICIENT for power oriented workqueuesViresh Kumar
Workqueues can be performance or power-oriented. Currently, most workqueues are bound to the CPU they were created on. This gives good performance (due to cache effects) at the cost of potentially waking up otherwise idle cores (Idle from scheduler's perspective. Which may or may not be physically idle) just to process some work. To save power, we can allow the work to be rescheduled on a core that is already awake. Workqueues created with the WQ_UNBOUND flag will allow some power savings. However, we don't change the default behaviour of the system. To enable power-saving behaviour, a new config option CONFIG_WQ_POWER_EFFICIENT needs to be turned on. This option can also be overridden by the workqueue.power_efficient boot parameter. tj: Updated config description and comments. Renamed CONFIG_WQ_POWER_EFFICIENT to CONFIG_WQ_POWER_EFFICIENT_DEFAULT. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org> Signed-off-by: Tejun Heo <tj@kernel.org> (cherry picked from commit cee22a15052faa817e3ec8985a28154d3fabc7aa) Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-18Merge branches 'master-arm-multi_pmu_v2', 'master-config-fragments', ↵Jon Medhurst
'master-hw-bkpt-fix', 'master-misc-patches' and 'master-task-placement-v2-updates' into big-LITTLE-MP-master-v19 Updates: ------- - Rebased over 3.10 final - Differences from big-LITTLE-MP-master-v18 - New Patches: - master-config-fragments: 1 new patch - "config: Disable priority filtering for HMP Scheduler" - master-misc-patches: 1 new patch - "mm: make vmstat_update periodic run conditional" - New Branches: - master-task-placement-v2-updates: 7 patches New patches from ARM added in a new topic branch stacked on top of master-task-placement-v2-sysfs... - Revert "sched: Enable HMP priority filter by default" - "HMP: Use unweighted load for hmp migration decisions" - "HMP: Select least-loaded CPU when performing HMP Migrations" - "HMP: Avoid multiple calls to hmp_domain_min_load in fast path" - "HMP: Force new non-kernel tasks onto big CPUs until load stabilises" - "sched: Restrict nohz balance kicks to stay in the HMP domain" - "HMP: experimental: Force all rt tasks to start on little domain." Commands used for merge: ----------------------- $ git checkout -b big-LITTLE-MP-master-v19 v3.10 $ git merge master-arm-multi_pmu_v2 master-config-fragments \ master-hw-bkpt-fix master-misc-patches master-task-placement-v2 \ master-task-placement-v2-sysfs master-task-placement-v2-updates
2013-07-17Merge branch 'lsk-3.10-vexpress' of git://git.linaro.org/people/tixy/kernel ↵Mark Brown
into lsk-v3.10-tc2
2013-07-17Merge branch 'iks' of git://git.linaro.org/people/nico/linux into lsk-v3.10-ikstopic/v3.10/iksMark Brown
2013-07-17Merge branch 'config-core-3.10' of git://git.linaro.org/kernel/configs into ↵Mark Brown
lsk-v3.10-configs
2013-07-17Merge branch 'tracking-armlt-tc2-cpufreq' into lsk-3.10-vexpressJon Medhurst
2013-07-17Merge branch 'tracking-armlt-tc2-psci' into lsk-3.10-vexpressJon Medhurst
2013-07-17Merge branch 'tracking-armlt-tc2-pm' into lsk-3.10-vexpressJon Medhurst
Conflicts: arch/arm/mach-vexpress/Makefile
2013-07-17Merge branch 'tracking-armlt-dcscb' into lsk-3.10-vexpressJon Medhurst
2013-07-17Merge branch 'tracking-armlt-psci' into lsk-3.10-vexpressJon Medhurst
Conflicts: arch/arm/kernel/psci.c
2013-07-17Merge branch 'tracking-armlt-spc' into lsk-3.10-vexpressJon Medhurst
2013-07-17Merge branch 'tracking-armlt-cci' into lsk-3.10-vexpressJon Medhurst
Conflicts: arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts
2013-07-17Merge branch 'tracking-armlt-mcpm' into lsk-3.10-vexpressJon Medhurst
2013-07-17Merge branch 'tracking-armlt-tc2-dt' into lsk-3.10-vexpressJon Medhurst
2013-07-17Merge branch 'tracking-armlt-misc-fixes' into lsk-3.10-vexpressJon Medhurst
2013-07-17Merge branch 'tracking-armlt-clcd' into lsk-3.10-vexpressJon Medhurst
2013-07-17Merge branch 'tracking-armlt-hdlcd' into lsk-3.10-vexpressJon Medhurst
2013-07-17Merge branch 'tracking-armlt-ve-updates' into lsk-3.10-vexpressJon Medhurst
2013-07-17Merge branch 'tracking-armlt-rtsm' into lsk-3.10-vexpressJon Medhurst
2013-07-17Merge branch 'tracking-armlt-config' into lsk-3.10-vexpressJon Medhurst
2013-07-17HMP: experimental: Force all rt tasks to start on little domain.Dietmar Eggemann
This patch restricts the allowed cpu mask for rt tasks initially started with a full cpu mask to the little domain. An rt task is specified as real time in __setscheduler() which is finally called for all rt tasks (kernel and user land). In this function we restrict the allowed cpu mask to the little domain. This also prevents that a rt tasks can later be pushed to the big domain because the function find_lowest_rq() will only recognize the allowed cpu mask of a task to find the new cpu the task runs on. Current kludges of the patch: * Since we do not have an API to get the cpu mask of the A7 cluster, hmp_slow_cpu_mask is made global in arm/kernel/topology.c for now. * The watchdog_enable() function calls sched_setscheduler() before kthread_bind() for the cpu specific watchdog kernel threads. The order of these two calls has to be changed to make this patch work. Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
2013-07-17sched: Restrict nohz balance kicks to stay in the HMP domainChris Redpath
There is little point in doing a nohz balance kick on a CPU from a different HMP domain, since the unset SD_LOAD_BALANCE flag on the CPU domain level prevents tasks from being balanced across clusters except through the per-task load driven hmp_migrate/hmp_offload paths. Further, the nohz balance kick is actively harmful to power usage if all the tasks fit into the little domain since it causes the big domain to wake up and do a lot of calculation to determine that there is nothing to do. A more generic solution is to walk the sched domain tree and determine the intersection of potential idle balance cpus with visibility of tasks on the current CPU, however HMP domains are more easily accessible. Signed-off-by: Chris Redpath <chris.redpath@arm.com>
2013-07-17HMP: Force new non-kernel tasks onto big CPUs until load stabilisesChris Redpath
Initialise the load stats for new tasks so that they do not see the instability in early task life which makes it so hard to decide which CPU is appropriate. Also, change the fork balance algorithm so that the least loaded of the CPUs in the big cluster is chosen regardless of the bigness of the parent task. This is intended to help performance for applications which use many short-lived tasks. Although best practise is usually to use a thread pool, apps which do not do this should not be subject to the randomness of the early stats. We should ignore real-time threads for forking on big CPUs, but it is not possible to figure out if a new thread is real-time or not at the fork stage. Instead, we prevent kernel threads from getting the initial boost - when they later become real-time they will only be on big if their compute requirements demand it. Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com> Signed-off-by: Chris Redpath <chris.redpath@arm.com>
2013-07-17HMP: Avoid multiple calls to hmp_domain_min_load in fast pathChris Redpath
When evaluating a migration we make two calls to hmp_domain_min_load. This is unnecessary if we pass on the target CPU information from the hmp_up_migration path. In hmp_down_migration, we don't consider the load of the target CPUS. Signed-off-by: Chris Redpath <chris.redpath@arm.com>
2013-07-17HMP: Select least-loaded CPU when performing HMP MigrationsChris Redpath
The reference patch set always selects the first CPU in an HMP domain as a migration target. In busy situations, this means that the migrated thread cannot make immediate use of an idle CPU but must share a busy one until the load balancer runs across the big domain. This patch uses the hmp_domain_min_load function introduced in global balancing to figure out which of the CPUs is the least busy and selects that as a migration target - in both directions. This essentially implements a task-spread strategy and is intended to maximise performance of migrated threads but is likely to use more power than the packing strategy previously employed. Signed-off-by: Chris Redpath <chris.redpath@arm.com>
2013-07-17HMP: Use unweighted load for hmp migration decisionsChris Redpath
Normal task and runqueue loading is scaled according to priority to end up with a weighted load, known as the contribution. We want the CPU time to be allotted according to priority, but we also want to make big/little decisions based upon raw load. It is common, for example, for Android apps following the dev guide to end up with all their long-running or async action threads as low priority unless they override the AsyncThread constructor. All these threads are such low priority that they become invisible to the hmp_offload routine. Using unweighted load here allows us to maximise CPU usage in busy situations. Signed-off-by: Chris Redpath <chris.redpath@arm.com>
2013-07-17Revert "sched: Enable HMP priority filter by default"Chris Redpath
This reverts commit 68315334e32932739145ddb41a46cc86b8b056b3. Having the priority filter enabled prevents proper operation on Android systems where a wider range of priorities are used by userspace to partition types of tasks. Those tasks should still be able to benefit from the use of big CPUs when required. Signed-off-by: Chris Redpath <chris.redpath@arm.com>
2013-07-17mm: make vmstat_update periodic run conditionalGilad Ben-Yossef
vmstat_update runs every second from the work queue to update statistics and drain per cpu pages back into the global page allocator. This is useful in most circumstances but is wasteful if the CPU doesn't actually make any VM activity. This can happen in the situtation that the CPU is idle or running a CPU bound long term task (e.g. CPU isolation), in which case the periodic vmstate_update timer needlessly itnerrupts the CPU. This patch tries to make vmstat_update schedule itself for the next round only if there was any work for it to do in the previous run. The assumption is that if for a whole second we didn't see any VM activity it is reasnoable to assume that the CPU is not using the VM because it is idle or runs a long term single CPU bound task. A new single unbound system work queue item is scheduled periodically to monitor CPUs that have their vmstat_update work stopped and re-schedule them if VM activity is detected. Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> CC: Thomas Gleixner <tglx@linutronix.de> CC: Tejun Heo <tj@kernel.org> CC: John Stultz <johnstul@us.ibm.com> CC: Andrew Morton <akpm@linux-foundation.org> CC: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> CC: Mel Gorman <mel@csn.ul.ie> CC: Mike Frysinger <vapier@gentoo.org> CC: David Rientjes <rientjes@google.com> CC: Hugh Dickins <hughd@google.com> CC: Minchan Kim <minchan.kim@gmail.com> CC: Konstantin Khlebnikov <khlebnikov@openvz.org> CC: Christoph Lameter <cl@linux.com> CC: Chris Metcalf <cmetcalf@tilera.com> CC: Hakan Akkan <hakanakkan@gmail.com> CC: Max Krasnyansky <maxk@qualcomm.com> CC: Frederic Weisbecker <fweisbec@gmail.com> CC: linux-kernel@vger.kernel.org CC: linux-mm@kvack.org
2013-07-17config: Disable priority filtering for HMP SchedulerChris Redpath
Android uses threads with very low priority by default to implement AsyncTask APIs. This means that applications making use of these APIs to produce multithreaded code are penalised by not allowing use of big CPUs as necessary. Signed-off-by: Chris Redpath <chris.redpath@arm.com>
2013-07-17sched: cfs.nr_running does not contain the intended metricChris Redpath
rq->nr_running is the actual number of runnable tasks we wish to use to determine if a task is alone on a CPU. Change-Id: Icaf3022e02924ecdc94e14d4146c6fadd9580e2b Signed-off-by: Chris Redpath <chris.redpath@arm.com>