* [PATCH 0/2] Two missing _HARD annotations for the timer code
@ 2019-08-23 11:38 Sebastian Andrzej Siewior
2019-08-23 11:38 ` [PATCH 1/2] hrtimer: Add kernel doc annotation for HRTIMER_MODE_HARD Sebastian Andrzej Siewior
2019-08-23 11:38 ` [PATCH 2/2] tick: Mark sched_timer in hard interrupt context Sebastian Andrzej Siewior
0 siblings, 2 replies; 6+ messages in thread
From: Sebastian Andrzej Siewior @ 2019-08-23 11:38 UTC (permalink / raw)
To: linux-kernel; +Cc: Thomas Gleixner
I compared my old queue vs tip/master and noticed two missing hunks.
Sebastian
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] hrtimer: Add kernel doc annotation for HRTIMER_MODE_HARD
2019-08-23 11:38 [PATCH 0/2] Two missing _HARD annotations for the timer code Sebastian Andrzej Siewior
@ 2019-08-23 11:38 ` Sebastian Andrzej Siewior
2019-08-28 11:03 ` [tip: timers/core] " tip-bot2 for Sebastian Andrzej Siewior
2019-08-23 11:38 ` [PATCH 2/2] tick: Mark sched_timer in hard interrupt context Sebastian Andrzej Siewior
1 sibling, 1 reply; 6+ messages in thread
From: Sebastian Andrzej Siewior @ 2019-08-23 11:38 UTC (permalink / raw)
To: linux-kernel; +Cc: Thomas Gleixner, Sebastian Andrzej Siewior
Add kernel doc annotation for HRTIMER_MODE_HARD.
This should have been part of commit
ae6683d815895 ("hrtimer: Introduce HARD expiry mode")
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
include/linux/hrtimer.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index 5df4bcff96d58..1b9a51a1bccb7 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -32,6 +32,8 @@ struct hrtimer_cpu_base;
* when starting the timer)
* HRTIMER_MODE_SOFT - Timer callback function will be executed in
* soft irq context
+ * HRTIMER_MODE_HARD - Timer callback function will be executed in
+ * hard irq context even on PREEMPT_RT.
*/
enum hrtimer_mode {
HRTIMER_MODE_ABS = 0x00,
--
2.23.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] tick: Mark sched_timer in hard interrupt context
2019-08-23 11:38 [PATCH 0/2] Two missing _HARD annotations for the timer code Sebastian Andrzej Siewior
2019-08-23 11:38 ` [PATCH 1/2] hrtimer: Add kernel doc annotation for HRTIMER_MODE_HARD Sebastian Andrzej Siewior
@ 2019-08-23 11:38 ` Sebastian Andrzej Siewior
2019-08-28 11:03 ` [tip: timers/core] tick: Mark sched_timer to expire " tip-bot2 for Sebastian Andrzej Siewior
1 sibling, 1 reply; 6+ messages in thread
From: Sebastian Andrzej Siewior @ 2019-08-23 11:38 UTC (permalink / raw)
To: linux-kernel; +Cc: Thomas Gleixner, Sebastian Andrzej Siewior
The sched_timer should be initialized with the _HARD suffix. Most of
this already happened in commit
902a9f9c50905 ("tick: Mark tick related hrtimers to expiry in hard interrupt context")
but this one instance has been missed.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
kernel/time/tick-sched.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index cc1a322121b4b..433879b35cbb7 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -1239,7 +1239,7 @@ static void tick_nohz_switch_to_nohz(void)
* Recycle the hrtimer in ts, so we can share the
* hrtimer_forward with the highres code.
*/
- hrtimer_init(&ts->sched_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
+ hrtimer_init(&ts->sched_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_HARD);
/* Get the next period */
next = tick_init_jiffy_update();
--
2.23.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [tip: timers/core] tick: Mark sched_timer to expire in hard interrupt context
2019-08-23 11:38 ` [PATCH 2/2] tick: Mark sched_timer in hard interrupt context Sebastian Andrzej Siewior
@ 2019-08-28 11:03 ` tip-bot2 for Sebastian Andrzej Siewior
2019-08-28 13:48 ` Frederic Weisbecker
0 siblings, 1 reply; 6+ messages in thread
From: tip-bot2 for Sebastian Andrzej Siewior @ 2019-08-28 11:03 UTC (permalink / raw)
To: linux-tip-commits
Cc: Sebastian Andrzej Siewior, Thomas Gleixner, Ingo Molnar,
Borislav Petkov, linux-kernel
The following commit has been merged into the timers/core branch of tip:
Commit-ID: 71fed982d63cb2bb88db6f36059e3b14a7913846
Gitweb: https://git.kernel.org/tip/71fed982d63cb2bb88db6f36059e3b14a7913846
Author: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
AuthorDate: Fri, 23 Aug 2019 13:38:45 +02:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Wed, 28 Aug 2019 13:01:26 +02:00
tick: Mark sched_timer to expire in hard interrupt context
sched_timer must be initialized with the _HARD mode suffix to ensure expiry
in hard interrupt context on RT.
The previous conversion to HARD expiry mode missed on one instance in
tick_nohz_switch_to_nohz(). Fix it up.
Fixes: 902a9f9c50905 ("tick: Mark tick related hrtimers to expiry in hard interrupt context")
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20190823113845.12125-3-bigeasy@linutronix.de
---
kernel/time/tick-sched.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index 01ff32a..9558517 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -1233,7 +1233,7 @@ static void tick_nohz_switch_to_nohz(void)
* Recycle the hrtimer in ts, so we can share the
* hrtimer_forward with the highres code.
*/
- hrtimer_init(&ts->sched_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
+ hrtimer_init(&ts->sched_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_HARD);
/* Get the next period */
next = tick_init_jiffy_update();
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [tip: timers/core] hrtimer: Add kernel doc annotation for HRTIMER_MODE_HARD
2019-08-23 11:38 ` [PATCH 1/2] hrtimer: Add kernel doc annotation for HRTIMER_MODE_HARD Sebastian Andrzej Siewior
@ 2019-08-28 11:03 ` tip-bot2 for Sebastian Andrzej Siewior
0 siblings, 0 replies; 6+ messages in thread
From: tip-bot2 for Sebastian Andrzej Siewior @ 2019-08-28 11:03 UTC (permalink / raw)
To: linux-tip-commits
Cc: Sebastian Andrzej Siewior, Thomas Gleixner, Ingo Molnar,
Borislav Petkov, linux-kernel
The following commit has been merged into the timers/core branch of tip:
Commit-ID: a67e408241783575716fcf3f79d0878f6cef0273
Gitweb: https://git.kernel.org/tip/a67e408241783575716fcf3f79d0878f6cef0273
Author: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
AuthorDate: Fri, 23 Aug 2019 13:38:44 +02:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Wed, 28 Aug 2019 13:01:25 +02:00
hrtimer: Add kernel doc annotation for HRTIMER_MODE_HARD
Add kernel doc annotation for HRTIMER_MODE_HARD.
Fixes: ae6683d815895 ("hrtimer: Introduce HARD expiry mode")
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20190823113845.12125-2-bigeasy@linutronix.de
---
include/linux/hrtimer.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index 5df4bcf..1b9a51a 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -32,6 +32,8 @@ struct hrtimer_cpu_base;
* when starting the timer)
* HRTIMER_MODE_SOFT - Timer callback function will be executed in
* soft irq context
+ * HRTIMER_MODE_HARD - Timer callback function will be executed in
+ * hard irq context even on PREEMPT_RT.
*/
enum hrtimer_mode {
HRTIMER_MODE_ABS = 0x00,
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [tip: timers/core] tick: Mark sched_timer to expire in hard interrupt context
2019-08-28 11:03 ` [tip: timers/core] tick: Mark sched_timer to expire " tip-bot2 for Sebastian Andrzej Siewior
@ 2019-08-28 13:48 ` Frederic Weisbecker
0 siblings, 0 replies; 6+ messages in thread
From: Frederic Weisbecker @ 2019-08-28 13:48 UTC (permalink / raw)
To: linux-kernel
Cc: linux-tip-commits, Sebastian Andrzej Siewior, Thomas Gleixner,
Ingo Molnar, Borislav Petkov
On Wed, Aug 28, 2019 at 11:03:33AM -0000, tip-bot2 for Sebastian Andrzej Siewior wrote:
> The following commit has been merged into the timers/core branch of tip:
>
> Commit-ID: 71fed982d63cb2bb88db6f36059e3b14a7913846
> Gitweb: https://git.kernel.org/tip/71fed982d63cb2bb88db6f36059e3b14a7913846
> Author: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> AuthorDate: Fri, 23 Aug 2019 13:38:45 +02:00
> Committer: Thomas Gleixner <tglx@linutronix.de>
> CommitterDate: Wed, 28 Aug 2019 13:01:26 +02:00
>
> tick: Mark sched_timer to expire in hard interrupt context
>
> sched_timer must be initialized with the _HARD mode suffix to ensure expiry
> in hard interrupt context on RT.
>
> The previous conversion to HARD expiry mode missed on one instance in
> tick_nohz_switch_to_nohz(). Fix it up.
>
> Fixes: 902a9f9c50905 ("tick: Mark tick related hrtimers to expiry in hard interrupt context")
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Link: https://lkml.kernel.org/r/20190823113845.12125-3-bigeasy@linutronix.de
>
> ---
> kernel/time/tick-sched.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
> index 01ff32a..9558517 100644
> --- a/kernel/time/tick-sched.c
> +++ b/kernel/time/tick-sched.c
> @@ -1233,7 +1233,7 @@ static void tick_nohz_switch_to_nohz(void)
> * Recycle the hrtimer in ts, so we can share the
> * hrtimer_forward with the highres code.
> */
> - hrtimer_init(&ts->sched_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
> + hrtimer_init(&ts->sched_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_HARD);
That said, this instance only uses hrtimer for time computing. The backend is
clockevent directly.
> /* Get the next period */
> next = tick_init_jiffy_update();
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-08-28 13:48 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-23 11:38 [PATCH 0/2] Two missing _HARD annotations for the timer code Sebastian Andrzej Siewior
2019-08-23 11:38 ` [PATCH 1/2] hrtimer: Add kernel doc annotation for HRTIMER_MODE_HARD Sebastian Andrzej Siewior
2019-08-28 11:03 ` [tip: timers/core] " tip-bot2 for Sebastian Andrzej Siewior
2019-08-23 11:38 ` [PATCH 2/2] tick: Mark sched_timer in hard interrupt context Sebastian Andrzej Siewior
2019-08-28 11:03 ` [tip: timers/core] tick: Mark sched_timer to expire " tip-bot2 for Sebastian Andrzej Siewior
2019-08-28 13:48 ` Frederic Weisbecker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).