Files
android_kernel_samsung_msm8…/kernel
Michael Bohan 878f1bd9dd hrtimer: Prevent enqueue of hrtimer on dead CPU
When switching the hrtimer cpu_base, we briefly allow for
preemption to become enabled by unlocking the cpu_base lock.
During this time, the CPU corresponding to the new cpu_base
that was selected may in fact go offline. In this scenario, the
hrtimer is enqueued to a CPU that's not online, and therefore
it never fires.

As an example, consider this example:

CPU #0                          CPU #1
----                            ----
...                             hrtimer_start()
                                 lock_hrtimer_base()
                                 switch_hrtimer_base()
                                  cpu = hrtimer_get_target() -> 1
                                  spin_unlock(&cpu_base->lock)
                                <migrate thread to CPU #0>
                                <offline>
spin_lock(&new_base->lock)
this_cpu = 0
cpu != this_cpu
enqueue_hrtimer(cpu_base #1)

To prevent this scenario, verify that the CPU corresponding to
the new cpu_base is indeed online before selecting it in
hrtimer_switch_base(). If it's not online, fallback to using the
base of the current CPU.

Change-Id: I6359cb299ba7e08abf25d3360fcdd925b4c03b69
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
2013-04-08 15:01:19 -07:00
..
…
2012-06-26 10:35:13 -07:00
2012-12-03 11:37:28 -08:00
…
…
2012-04-09 13:57:52 -07:00
2012-03-28 18:30:03 +01:00
…
…
2012-03-26 12:50:53 +10:30
…
2012-03-29 19:52:46 +08:00
2012-03-23 16:58:41 -07:00
…
2012-03-28 18:30:03 +01:00
2011-10-31 17:30:44 -07:00
2011-12-21 12:57:40 -08:00
2012-03-15 18:17:55 -07:00
…