Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1489603
| From | Steven Rostedt <rostedt@goodmis.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH RT 01/10] timers: wakeup all timer waiters |
| Date | 2016-09-23 00:00 +0200 |
| Message-ID | <skkca-3ii-35@gated-at.bofh.it> (permalink) |
| References | <skkca-3ii-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
4.1.33-rt38-rc1 stable review patch.
If anyone has any objections, please let me know.
------------------
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
The base lock is dropped during the invocation if the timer. That means
it is possible that we have one waiter while timer1 is running and once
this one finished, we get another waiter while timer2 is running. Since
we wake up only one waiter it is possible that we miss the other one.
This will probably heal itself over time because most of the time we
complete timers without an active wake up.
To avoid the scenario where we don't wake up all waiters at once,
wake_up_all() is used.
Cc: stable-rt@vger.kernel.org
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/time/timer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/time/timer.c b/kernel/time/timer.c
index c68ba873da3c..5a45162ae924 100644
--- a/kernel/time/timer.c
+++ b/kernel/time/timer.c
@@ -1019,7 +1019,7 @@ static void wait_for_running_timer(struct timer_list *timer)
base->running_timer != timer);
}
-# define wakeup_timer_waiters(b) wake_up(&(b)->wait_for_running_timer)
+# define wakeup_timer_waiters(b) wake_up_all(&(b)->wait_for_running_timer)
#else
static inline void wait_for_running_timer(struct timer_list *timer)
{
--
2.8.1
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH RT 00/10] Linux 4.1.33-rt38-rc1 Steven Rostedt <rostedt@goodmis.org> - 2016-09-23 00:00 +0200 [PATCH RT 08/10] x86/preempt-lazy: fixup should_resched() Steven Rostedt <rostedt@goodmis.org> - 2016-09-23 00:00 +0200 [PATCH RT 10/10] Linux 4.1.33-rt38-rc1 Steven Rostedt <rostedt@goodmis.org> - 2016-09-23 00:00 +0200 [PATCH RT 01/10] timers: wakeup all timer waiters Steven Rostedt <rostedt@goodmis.org> - 2016-09-23 00:00 +0200 [PATCH RT 02/10] timers: wakeup all timer waiters without holding the base lock Steven Rostedt <rostedt@goodmis.org> - 2016-09-23 00:10 +0200 Re: [PATCH RT 05/10] net: add back the missing serialization in ip_send_unicast_reply() Steven Rostedt <rostedt@goodmis.org> - 2016-09-23 00:10 +0200 [PATCH RT 07/10] fs/dcache: resched/chill only if we make no progress Steven Rostedt <rostedt@goodmis.org> - 2016-09-23 00:10 +0200 [PATCH RT 04/10] scsi/fcoe: Fix get_cpu()/put_cpu_light() imbalance in fcoe_recv_frame() Steven Rostedt <rostedt@goodmis.org> - 2016-09-23 00:10 +0200
csiph-web