lineage_android_kernel_sams.../kernel
Leon Ma a91ccfcaaa hrtimer: Prevent remote enqueue of leftmost timers
commit 012a45e3f4af68e86d85cce060c6c2fed56498b2 upstream.

If a cpu is idle and starts an hrtimer which is not pinned on that
same cpu, the nohz code might target the timer to a different cpu.

In the case that we switch the cpu base of the timer we already have a
sanity check in place, which determines whether the timer is earlier
than the current leftmost timer on the target cpu. In that case we
enqueue the timer on the current cpu because we cannot reprogram the
clock event device on the target.

If the timers base is already the target CPU we do not have this
sanity check in place so we enqueue the timer as the leftmost timer in
the target cpus rb tree, but we cannot reprogram the clock event
device on the target cpu. So the timer expires late and subsequently
prevents the reprogramming of the target cpu clock event device until
the previously programmed event fires or a timer with an earlier
expiry time gets enqueued on the target cpu itself.

Add the same target check as we have for the switch base case and
start the timer on the current cpu if it would become the leftmost
timer on the target.

[ tglx: Rewrote subject and changelog ]

Signed-off-by: Leon Ma <xindong.ma@intel.com>
Link: http://lkml.kernel.org/r/1398847391-5994-1-git-send-email-xindong.ma@intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-07 16:02:01 -07:00
..
debug
events list: introduce list_next_entry() and list_prev_entry() 2014-06-07 16:01:58 -07:00
gcov
irq genirq: Remove racy waitqueue_active check 2014-03-23 21:37:05 -07:00
power PM / Hibernate: Hibernate/thaw fixes/improvements 2014-02-20 10:45:33 -08:00
sched sched: Fix double normalization of vruntime 2014-03-23 21:37:03 -07:00
time time: Fix overflow when HZ is smaller than 60 2014-02-22 10:32:46 -08:00
trace ftrace/module: Hardcode ftrace_module_init() call into load_module() 2014-06-07 16:02:00 -07:00
.gitignore
Kconfig.freezer
Kconfig.hz
Kconfig.locks
Kconfig.preempt
Makefile
acct.c
async.c
audit.c audit: wait_for_auditd() should use TASK_UNINTERRUPTIBLE 2014-04-14 06:44:15 -07:00
audit.h
audit_tree.c
audit_watch.c
auditfilter.c
auditsc.c
backtracetest.c
bounds.c
capability.c
cgroup.c cgroup: cgroup_subsys->fork() should be called after the task is added to css_set 2014-03-11 16:10:03 -07:00
cgroup_freezer.c cgroup: cgroup_subsys->fork() should be called after the task is added to css_set 2014-03-11 16:10:03 -07:00
compat.c
configs.c
cpu.c CPU hotplug: provide a generic helper to disable/enable CPU hotplug 2013-06-20 11:58:44 -07:00
cpu_pm.c
cpuset.c cpuset: fix a race condition in __cpuset_node_allowed_softwall() 2014-03-23 21:37:05 -07:00
crash_dump.c
cred.c
delayacct.c
dma.c
elfcore.c
exec_domain.c
exit.c wait: fix reparent_leader() vs EXIT_DEAD->EXIT_ZOMBIE race 2014-04-26 17:13:20 -07:00
extable.c
fork.c cgroup: cgroup_subsys->fork() should be called after the task is added to css_set 2014-03-11 16:10:03 -07:00
freezer.c
futex.c futex: Prevent attaching to kernel threads 2014-06-07 16:02:00 -07:00
futex_compat.c
groups.c
hrtimer.c hrtimer: Prevent remote enqueue of leftmost timers 2014-06-07 16:02:01 -07:00
hung_task.c
irq_work.c
itimer.c
jump_label.c
kallsyms.c
kexec.c
kfifo.c
kmod.c usermodehelper: check subprocess_info->path != NULL 2013-05-19 10:54:50 -07:00
kprobes.c
ksysfs.c
kthread.c
latencytop.c
lockdep.c
lockdep_internals.h
lockdep_proc.c
lockdep_states.h
module.c ftrace/module: Hardcode ftrace_module_init() call into load_module() 2014-06-07 16:02:00 -07:00
mutex-debug.c
mutex-debug.h
mutex.c
mutex.h
notifier.c
nsproxy.c
padata.c
panic.c
params.c
pid.c
pid_namespace.c
posix-cpu-timers.c
posix-timers.c
printk.c printk: Fix rq->lock vs logbuf_lock unlock lock inversion 2014-04-14 06:44:16 -07:00
profile.c
ptrace.c exec/ptrace: fix get_dumpable() incorrect tests 2013-11-29 10:50:34 -08:00
range.c
rcu.h
rcupdate.c
rcutiny.c
rcutiny_plugin.h
rcutorture.c
rcutree.c
rcutree.h
rcutree_plugin.h
rcutree_trace.c
relay.c
res_counter.c
resource.c
rtmutex-debug.c
rtmutex-debug.h
rtmutex-tester.c
rtmutex.c
rtmutex.h
rtmutex_common.h
rwsem.c
seccomp.c
semaphore.c
signal.c
smp.c
softirq.c
spinlock.c
srcu.c
stacktrace.c
stop_machine.c
sys.c reboot: rigrate shutdown/reboot to boot cpu 2013-06-20 11:58:45 -07:00
sys_ni.c
sysctl.c hung_task: check the value of "sysctl_hung_task_timeout_sec" 2014-05-06 07:51:45 -07:00
sysctl_binary.c
taskstats.c
test_kprobes.c
time.c
timeconst.pl
timer.c timer: Prevent overflow in apply_slack 2014-06-07 16:02:00 -07:00
tracepoint.c tracepoint: Do not waste memory on mods with no tracepoints 2014-05-18 05:25:56 -07:00
tsacct.c
uid16.c
up.c
user-return-notifier.c
user.c
user_namespace.c
utsname.c
utsname_sysctl.c
wait.c
watchdog.c
workqueue.c workqueue: cond_resched() after processing each work item 2014-04-14 06:44:16 -07:00
workqueue_sched.h