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-05-18 17:03:10 -07:00
2012-04-26 13:51:31 +02:00
2012-06-26 10:35:13 -07:00
2013-03-22 15:18:30 -07:00
2012-12-03 11:37:28 -08:00
2012-07-17 16:50:23 -07:00
2012-11-05 14:00:28 -08:00
2012-01-08 12:19:57 -08:00
2012-01-13 09:32:18 +10:30
2012-03-20 21:29:40 -04:00
2012-01-17 16:16:57 -05:00
2012-01-17 16:17:01 -05:00
2012-01-23 08:44:53 -08:00
2012-01-17 10:19:41 -08:00
2012-03-30 00:09:34 -07:00
2012-04-09 13:53:12 -07:00
2012-05-10 08:58:33 -07:00
2011-11-29 16:42:33 -05:00
2012-04-09 13:57:52 -07:00
2012-04-02 08:53:24 -07:00
2011-11-06 19:44:47 -08:00
2012-04-11 08:20:11 -07:00
2012-03-28 18:30:03 +01:00
2013-02-21 09:45:35 -08:00
2013-02-21 09:45:35 -08:00
2012-03-04 23:08:54 +01:00
2012-03-29 11:37:17 +02:00
2012-03-30 00:09:34 -07:00
2011-10-31 09:20:12 -04:00
2013-04-08 15:01:19 -07:00
2012-03-05 15:49:42 -08:00
2012-04-13 13:15:16 -04:00
2012-04-10 11:00:30 +02:00
2012-02-28 20:01:08 +01:00
2012-04-23 14:29:54 -07:00
2012-03-23 13:18:57 +01:00
2012-03-23 13:18:57 +01:00
2012-03-28 17:19:28 -07:00
2011-10-31 09:20:12 -04:00
2012-03-28 23:30:28 +02:00
2012-03-30 00:09:34 -07:00
2011-10-31 09:20:13 -04:00
2011-11-23 09:28:17 -08:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2012-02-21 09:06:06 -08:00
2012-01-24 16:37:54 -08:00
2012-03-26 12:50:53 +10:30
2011-10-31 09:20:12 -04:00
2012-03-01 10:28:03 +01:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2012-03-29 19:52:46 +08:00
2013-01-15 16:16:09 -08:00
2012-03-26 12:50:51 +10:30
2012-03-28 17:14:36 -07:00
2012-02-13 20:45:38 -05:00
2011-12-15 14:56:19 +01:00
2011-10-31 09:20:12 -04:00
2012-10-10 09:44:32 -07:00
2011-10-31 09:20:12 -04:00
2012-03-23 16:58:41 -07:00
2011-10-31 09:20:11 -04:00
2012-02-21 09:06:12 -08:00
2012-02-21 09:06:03 -08:00
2012-02-21 09:03:43 -08:00
2012-02-21 09:06:13 -08:00
2012-02-21 09:06:10 -08:00
2012-02-21 09:42:30 -08:00
2012-02-21 09:06:07 -08:00
2012-10-04 15:58:40 -07:00
2012-02-21 09:06:07 -08:00
2012-02-10 09:04:49 +01:00
2012-01-22 15:08:46 -05:00
2012-06-06 18:45:28 -07:00
2011-12-06 08:16:49 +01:00
2011-12-14 14:54:22 -08:00
2011-12-11 10:33:18 -08:00
2012-03-28 18:30:03 +01:00
2012-01-17 16:16:55 -05:00
2011-10-31 09:20:12 -04:00
2012-03-28 15:58:21 -07:00
2012-03-28 17:14:35 -07:00
2012-03-20 10:32:09 -07:00
2012-03-23 13:18:57 +01:00
2012-02-21 09:06:08 -08:00
2011-10-31 09:20:12 -04:00
2013-03-14 09:32:58 -07:00
2011-10-31 17:30:44 -07:00
2013-03-06 10:07:28 -08:00
2013-01-11 14:18:39 -08:00
2012-11-09 14:47:28 -08:00
2011-12-21 12:57:40 -08:00
2012-03-15 18:17:55 -07:00
2012-07-26 18:49:05 -07:00
2012-02-24 10:05:59 +01:00
2011-12-15 14:56:19 +01:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-11-06 19:44:47 -08:00
2011-10-31 09:20:12 -04:00
2011-12-21 10:07:39 +01:00
2012-03-23 16:58:32 -07:00
2012-03-20 18:13:22 -07:00