Commit Graph

16438 Commits

Author SHA1 Message Date
Huang, Tao
55c23da59b rockchip: hmp: adjust hmp_up/down_threshold
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2015-05-18 17:25:12 +08:00
Huang, Tao
0c1b12d1c3 cpuquiet: Update averaging of nr_runnables
Doing a Exponential moving average per nr_running++/-- does not
guarantee a fixed sample rate which induces errors if there are lots of
threads being enqueued/dequeued from the rq (Linpack mt). Instead of
keeping track of the avg, the scheduler now keeps track of the integral
of nr_running and allows the readers to perform filtering on top.

Implemented a proper exponential moving average for the runnables
governor and a straight 100ms average for the balanced governor. Tweaked
the thresholds for the runnables governor to minimize latency. Also,
decreased sample_rate for the runnables governor to the absolute minimum
of 10msecs.

Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2015-05-18 17:17:28 +08:00
Huang, Tao
e615617818 cpuquiet: PM QoS: Add max/min online cpus as PM QoS parameter
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2015-05-18 17:08:55 +08:00
Huang, Tao
f07d7eb591 Merge tag 'lsk-v3.10-15.04-android'
Conflicts:
	drivers/base/cpu.c
	drivers/misc/Kconfig
	drivers/misc/Makefile
2015-05-05 10:51:31 +08:00
Alex Shi
d78c0d2e46 Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android 2015-04-18 13:37:44 +08:00
Alex Shi
0bde84f402 Merge branch 'linux-3.10.y' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into linux-linaro-lsk 2015-04-18 13:36:38 +08:00
Alex Shi
26fb95cac5 Merge branch 'linaro-android-3.10-lsk' of git://android.git.linaro.org/kernel/linaro-android into linux-linaro-lsk-android
Remove conflictsed drivers/staging/android/logger.c
2015-04-17 13:40:43 +08:00
Amit Pundir
5b59692ae6 Merge branch 'android-3.10' of https://android.googlesource.com/kernel/common
* android-3.10: (23 commits)
  proc: uid_cputime: create uids from kuids
  wakeup: Add last wake up source logging for suspend abort reason.
  selinux: add SOCK_DIAG_BY_FAMILY to the list of netlink message types
  selinux/nlmsg: add XFRM_MSG_MAPPING
  selinux/nlmsg: add XFRM_MSG_MIGRATE
  selinux/nlmsg: add XFRM_MSG_REPORT
  selinux/nlmsg: add XFRM_MSG_[NEW|GET]SADINFO
  selinux/nlmsg: add XFRM_MSG_GETSPDINFO
  selinux/nlmsg: add XFRM_MSG_NEWSPDINFO
  SELinux: per-command whitelisting of ioctls
  security: lsm_audit: add ioctl specific auditing
  Power: Report suspend times from last_suspend_time
  arm: crypto: Add optimized SHA-256/224
  proc: uid: Adds accounting for the cputimes per uid.
  USB: gadget: android: Integrate f_midi USB MIDI gadget driver part deux
  android: base-cfg: disable ALARM_DEV
  staging: Remove logger and alarm-dev from android Makefile
  staging: Remove the Android alarm-dev driver
  staging: Remove the Android logger driver
  net: ping: fix constness inconsistency in ipv6_chk_addr
  ...
2015-04-16 13:34:01 +05:30
Alex Shi
726b4e0f4c Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android 2015-04-15 16:52:39 +08:00
Alex Shi
b3c57d879f Merge branch 'for-lsk' of git://git.linaro.org/arm/big.LITTLE/mp into linux-linaro-lsk 2015-04-15 16:51:30 +08:00
Kevin Hilman
c1f0c1f51b sched: hmp: fix spinlock recursion in active migration
Commit cd5c2cc93d (hmp: Remove potential for task_struct access
race) introduced a put_task_struct() to prevent races, but in doing so
introduced potential spinlock recursion.  (This change was further
consolidated in commit 0baa5811ba -- sched: hmp: unify active
migration code.)

Unfortunately, the put_task_struct() is done while the runqueue
spinlock is held, but put_task_struct() can also cause a reschedule
causing the runqueue lock to be acquired recursively.

To fix, move the put_task_struct() outside the runqueue spinlock.

Reported-by: Victor Lixin <victor.lixin@hisilicon.com>
Cc: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Cc: Liviu Dudau <Liviu.Dudau@arm.com>
Signed-off-by: Kevin Hilman <khilman@linaro.org>
Reviewed-by: Jon Medhurst <tixy@linaro.org>
Reviewed-by: Alex Shi <alex.shi@linaro.org>
Reviewed-by: Chris Redpath <chris.redpath@arm.com>
Signed-off-by: Jon Medhurst <tixy@linaro.org>
2015-04-14 12:08:16 +01:00
Peter Zijlstra
a49a0c95f4 perf: Fix irq_work 'tail' recursion
commit d525211f9d upstream.

Vince reported a watchdog lockup like:

	[<ffffffff8115e114>] perf_tp_event+0xc4/0x210
	[<ffffffff810b4f8a>] perf_trace_lock+0x12a/0x160
	[<ffffffff810b7f10>] lock_release+0x130/0x260
	[<ffffffff816c7474>] _raw_spin_unlock_irqrestore+0x24/0x40
	[<ffffffff8107bb4d>] do_send_sig_info+0x5d/0x80
	[<ffffffff811f69df>] send_sigio_to_task+0x12f/0x1a0
	[<ffffffff811f71ce>] send_sigio+0xae/0x100
	[<ffffffff811f72b7>] kill_fasync+0x97/0xf0
	[<ffffffff8115d0b4>] perf_event_wakeup+0xd4/0xf0
	[<ffffffff8115d103>] perf_pending_event+0x33/0x60
	[<ffffffff8114e3fc>] irq_work_run_list+0x4c/0x80
	[<ffffffff8114e448>] irq_work_run+0x18/0x40
	[<ffffffff810196af>] smp_trace_irq_work_interrupt+0x3f/0xc0
	[<ffffffff816c99bd>] trace_irq_work_interrupt+0x6d/0x80

Which is caused by an irq_work generating new irq_work and therefore
not allowing forward progress.

This happens because processing the perf irq_work triggers another
perf event (tracepoint stuff) which in turn generates an irq_work ad
infinitum.

Avoid this by raising the recursion counter in the irq_work -- which
effectively disables all software events (including tracepoints) from
actually triggering again.

Reported-by: Vince Weaver <vincent.weaver@maine.edu>
Tested-by: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/20150219170311.GH21418@twins.programming.kicks-ass.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-13 14:02:12 +02:00
jinqian
c2e60d7cef Power: Report suspend times from last_suspend_time
This node epxorts two values separated by space.
From left to right:
1. time spent in suspend/resume process
2. time spent sleep in suspend state

Change-Id: I2cb9a9408a5fd12166aaec11b935a0fd6a408c63
2015-04-09 18:50:24 +00:00
Huang, Tao
a203a16126 Merge tag lsk-v3.10-15.03-android
lsk-v3.10-15.03-android release
2015-04-02 09:25:21 +08:00
Alex Shi
91dc564681 Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android 2015-03-30 11:38:42 +08:00
Alex Shi
88720d8b84 Merge tag 'v3.10.73' into linux-linaro-lsk
This is the 3.10.73 stable release
2015-03-30 11:38:40 +08:00
Tejun Heo
d8bee0e3ab workqueue: fix hang involving racing cancel[_delayed]_work_sync()'s for PREEMPT_NONE
commit 8603e1b300 upstream.

cancel[_delayed]_work_sync() are implemented using
__cancel_work_timer() which grabs the PENDING bit using
try_to_grab_pending() and then flushes the work item with PENDING set
to prevent the on-going execution of the work item from requeueing
itself.

try_to_grab_pending() can always grab PENDING bit without blocking
except when someone else is doing the above flushing during
cancelation.  In that case, try_to_grab_pending() returns -ENOENT.  In
this case, __cancel_work_timer() currently invokes flush_work().  The
assumption is that the completion of the work item is what the other
canceling task would be waiting for too and thus waiting for the same
condition and retrying should allow forward progress without excessive
busy looping

Unfortunately, this doesn't work if preemption is disabled or the
latter task has real time priority.  Let's say task A just got woken
up from flush_work() by the completion of the target work item.  If,
before task A starts executing, task B gets scheduled and invokes
__cancel_work_timer() on the same work item, its try_to_grab_pending()
will return -ENOENT as the work item is still being canceled by task A
and flush_work() will also immediately return false as the work item
is no longer executing.  This puts task B in a busy loop possibly
preventing task A from executing and clearing the canceling state on
the work item leading to a hang.

task A			task B			worker

						executing work
__cancel_work_timer()
  try_to_grab_pending()
  set work CANCELING
  flush_work()
    block for work completion
						completion, wakes up A
			__cancel_work_timer()
			while (forever) {
			  try_to_grab_pending()
			    -ENOENT as work is being canceled
			  flush_work()
			    false as work is no longer executing
			}

This patch removes the possible hang by updating __cancel_work_timer()
to explicitly wait for clearing of CANCELING rather than invoking
flush_work() after try_to_grab_pending() fails with -ENOENT.

Link: http://lkml.kernel.org/g/20150206171156.GA8942@axis.com

v3: bit_waitqueue() can't be used for work items defined in vmalloc
    area.  Switched to custom wake function which matches the target
    work item and exclusive wait and wakeup.

v2: v1 used wake_up() on bit_waitqueue() which leads to NULL deref if
    the target bit waitqueue has wait_bit_queue's on it.  Use
    DEFINE_WAIT_BIT() and __wake_up_bit() instead.  Reported by Tomeu
    Vizoso.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Rabin Vincent <rabin.vincent@axis.com>
Cc: Tomeu Vizoso <tomeu.vizoso@gmail.com>
Tested-by: Jesper Nilsson <jesper.nilsson@axis.com>
Tested-by: Rabin Vincent <rabin.vincent@axis.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 15:00:58 +01:00
Alex Shi
42f45c9abd Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android 2015-03-19 08:57:07 +08:00
Alex Shi
ba0bfedf4c Merge tag 'v3.10.72' into linux-linaro-lsk
This is the 3.10.72 stable release
2015-03-19 08:57:04 +08:00
Mark Brown
4d8fd56f05 Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android 2015-03-18 14:34:36 +00:00
Michael Scott
8dbaea2b3d PM / QoS: remove duplicate call to pm_qos_update_target
In 3.10.y backport patch 1dba303727,
the logic to call pm_qos_update_target was moved to __pm_qos_update_request.
However, the original code was left in function pm_qos_update_request.

Currently, if pm_qos_update_request is called where new_value !=
req->node.prio then pm_qos_update_target will be called twice in a row.
Once in pm_qos_update_request and then again in the following call to
_pm_qos_update_request.

Removing the left over code from pm_qos_update_request stops this second
call to pm_qos_update_target where the work of removing / re-adding the
new_value in the constraints list would be duplicated.

Signed-off-by: Michael Scott <michael.scott@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-18 13:22:28 +01:00
Mark Brown
43e7406efd Merge remote-tracking branch 'lsk/v3.10/topic/gcov' into linux-linaro-lsk
Conflicts:
	arch/arm64/Kconfig
2015-03-17 21:59:05 +00:00
Riku Voipio
3d95e2f8f6 gcov: enable GCOV_PROFILE_ALL from ARCH Kconfigs
Following the suggestions from Andrew Morton and Stephen Rothwell,
Dont expand the ARCH list in kernel/gcov/Kconfig. Instead,
define a ARCH_HAS_GCOV_PROFILE_ALL bool which architectures
can enable.

set ARCH_HAS_GCOV_PROFILE_ALL on Architectures where it was
previously allowed + ARM64 which I tested.

Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Cc: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 957e3facd1)
Signed-off-by: Mark Brown <broonie@kernel.org>

Conflicts:
	arch/arm/Kconfig
	arch/arm64/Kconfig
	arch/microblaze/Kconfig
	arch/s390/Kconfig
	arch/x86/Kconfig
2015-03-17 21:53:42 +00:00
Frantisek Hrbata
eb05fc8193 kernel: add support for init_array constructors
This adds the .init_array section as yet another section with constructors. This
is needed because gcc could add __gcov_init calls to .init_array or .ctors
section, depending on gcc (and binutils) version .

v2: - reuse mod->ctors for .init_array section for modules, because gcc uses
      .ctors or .init_array, but not both at the same time
v3: - fail to load if that does happen somehow.

Signed-off-by: Frantisek Hrbata <fhrbata@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-03-17 21:52:04 +00:00
Frantisek Hrbata
9c6152e679 gcov: compile specific gcov implementation based on gcc version
Compile the correct gcov implementation file for the specific gcc version.

Signed-off-by: Frantisek Hrbata <fhrbata@redhat.com>
Cc: Jan Stancek <jstancek@redhat.com>
Cc: Kees Cook <keescook@chromium.org>
Acked-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Andy Gospodarek <agospoda@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 17c568d60a)
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-17 21:51:55 +00:00