diff options
author | Oleg Nesterov <oleg@redhat.com> | 2015-06-11 08:46:44 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2015-06-18 18:09:56 -0400 |
commit | c04dca02bc73096435a5c36efd5ccb2171edcbe1 (patch) | |
tree | 6875551d63882ac926b68a964c9629f45d0c4f7d /include | |
parent | 51a16c1e887a5975ada27a3ae935a4f2783005da (diff) |
hrtimer: Remove HRTIMER_STATE_MIGRATE
I do not understand HRTIMER_STATE_MIGRATE. Unless I am totally
confused it looks buggy and simply unneeded.
migrate_hrtimer_list() sets it to keep hrtimer_active() == T, but this
is not enough: this can fool, say, hrtimer_is_queued() in
dequeue_signal().
Can't migrate_hrtimer_list() simply use HRTIMER_STATE_ENQUEUED?
This fixes the race and we can kill STATE_MIGRATE.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: ktkhai@parallels.com
Cc: rostedt@goodmis.org
Cc: juri.lelli@gmail.com
Cc: pang.xunlei@linaro.org
Cc: wanpeng.li@linux.intel.com
Cc: umgwanakikbuti@gmail.com
Link: http://lkml.kernel.org/r/20150611124743.072387650@infradead.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/hrtimer.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 3f82a7edc03d..2f9e57d3d126 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -70,17 +70,13 @@ enum hrtimer_restart { | |||
70 | * the handling of the timer. | 70 | * the handling of the timer. |
71 | * | 71 | * |
72 | * The HRTIMER_STATE_ENQUEUED bit is always or'ed to the current state | 72 | * The HRTIMER_STATE_ENQUEUED bit is always or'ed to the current state |
73 | * to preserve the HRTIMER_STATE_CALLBACK in the above scenario. This | 73 | * to preserve the HRTIMER_STATE_CALLBACK in the above scenario. |
74 | * also affects HRTIMER_STATE_MIGRATE where the preservation is not | ||
75 | * necessary. HRTIMER_STATE_MIGRATE is cleared after the timer is | ||
76 | * enqueued on the new cpu. | ||
77 | * | 74 | * |
78 | * All state transitions are protected by cpu_base->lock. | 75 | * All state transitions are protected by cpu_base->lock. |
79 | */ | 76 | */ |
80 | #define HRTIMER_STATE_INACTIVE 0x00 | 77 | #define HRTIMER_STATE_INACTIVE 0x00 |
81 | #define HRTIMER_STATE_ENQUEUED 0x01 | 78 | #define HRTIMER_STATE_ENQUEUED 0x01 |
82 | #define HRTIMER_STATE_CALLBACK 0x02 | 79 | #define HRTIMER_STATE_CALLBACK 0x02 |
83 | #define HRTIMER_STATE_MIGRATE 0x04 | ||
84 | 80 | ||
85 | /** | 81 | /** |
86 | * struct hrtimer - the basic hrtimer structure | 82 | * struct hrtimer - the basic hrtimer structure |