sched/deadline: Make inactive timer run in hardirq context
Juri Lelli
maintainerPATCH 1/1 sched/deadline: Make inactive timer run in hardirq context
SCHED_DEADLINE inactive timer needs to run in hardirq context (as dl_task_timer already does).
Make it HRTIMER_MODE_REL_HARD.
---
Hi,
Both v4.19-rt and v5.2-rt need this.
Mainline "sched: Mark hrtimers to expire in hard interrupt context" series needs this as well ([email protected] in particular). Do I need to send out a separate patch for it?
Best,
Juri
--- kernel/sched/deadline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/deadline.c +1 -1
@@ -1292,7 +1292,7 @@ void init_dl_inactive_task_timer(struct sched_dl_entity *dl_se) {struct hrtimer *timer = &dl_se->inactive_timer; -hrtimer_init (timer,CLOCK_MONOTONIC ,HRTIMER_MODE_REL ); +hrtimer_init (timer,CLOCK_MONOTONIC ,HRTIMER_MODE_REL_HARD ); timer->function = inactive_task_timer; }
Signature · 1 line
2.17.2
tip-bot for Juri Lelli
merge bot[tip:timers/core] sched/deadline: Ensure inactive_timer runs in hardirq context
sched/deadline: Ensure inactive_timer runs in hardirq context
Commit-ID: b223cc1bb098ebd1077a5390c434db411806d6b8 Gitweb: https://git.kernel.org/tip/b223cc1bb098ebd1077a5390c434db411806d6b8 Author: Juri Lelli <[email protected]> AuthorDate: Wed, 31 Jul 2019 12:37:15 +0200 Committer: Thomas Gleixner <[email protected]> CommitDate: Wed, 31 Jul 2019 13:01:26 +0200
sched/deadline: Ensure inactive_timer runs in hardirq context
SCHED_DEADLINE inactive timer needs to run in hardirq context (as dl_task_timer already does) on PREEMPT_RT
Change the mode to HRTIMER_MODE_REL_HARD.
[ tglx: Fixed up the start site, so mode debugging works ]
--- kernel/sched/deadline.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/sched/deadline.c +2 -2
@@ -287,7 +287,7 @@ static void task_non_contending(struct task_struct *p) dl_se->dl_non_contending =1 ;get_task_struct (p); -hrtimer_start (timer,ns_to_ktime (zerolag_time),HRTIMER_MODE_REL ); +hrtimer_start (timer,ns_to_ktime (zerolag_time),HRTIMER_MODE_REL_HARD ); }static void task_contending (struct sched_dl_entity *dl_se,int flags)
@@ -1292,7 +1292,7 @@ void init_dl_inactive_task_timer(struct sched_dl_entity *dl_se) {struct hrtimer *timer = &dl_se->inactive_timer; -hrtimer_init (timer,CLOCK_MONOTONIC ,HRTIMER_MODE_REL ); +hrtimer_init (timer,CLOCK_MONOTONIC ,HRTIMER_MODE_REL_HARD ); timer->function = inactive_task_timer; }
Quoted 6 lines · Juri Lelli
SCHED_DEADLINEinactive timer needs to run in hardirq context (asdl_task_timeralready does).Make it
HRTIMER_MODE_REL_HARD.Signed-off-by Juri Lelli <[email protected]>
-- Daniel
Quoted 38 lines · On Wed, 31 Jul 2019 12:37:15 +0200 Juri Lelli <[email protected]> wrote:
SCHED_DEADLINEinactive timer needs to run in hardirq context (asdl_task_timeralready does).Make it
HRTIMER_MODE_REL_HARD.Signed-off-by Juri Lelli <[email protected]>---
Hi,Both v4.19-rt and v5.2-rt need this.
Mainline "sched: Mark hrtimers to expire in hard interrupt context" series needs this as well ([email protected] in particular). Do I need to send out a separate patch for it?
Best,
Juri
--- kernel/sched/deadline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)kernel/sched/deadline.c +1
-1@@ -1292,7 +1292,7 @@ void init_dl_inactive_task_timer(struct sched_dl_entity *dl_se) {struct hrtimer *timer = &dl_se->inactive_timer; -hrtimer_init (timer,CLOCK_MONOTONIC ,HRTIMER_MODE_REL ); +hrtimer_init (timer,CLOCK_MONOTONIC ,HRTIMER_MODE_REL_HARD ); timer->function = inactive_task_timer; }Signature · 1 line
2.17.2
Signature · 2 lines
The United States Coast Guard Ruining Natural Selection since 1790
tip-bot for Juri Lelli
merge bot[tip:timers/core] sched/deadline: Ensure inactive_timer runs in hardirq context
In reply to Juri Lellisched/deadline: Ensure inactive_timer runs in hardirq context
Commit-ID: 4394ba872c36255d25c6bde151b061f04655ebfb Gitweb: https://git.kernel.org/tip/4394ba872c36255d25c6bde151b061f04655ebfb Author: Juri Lelli <[email protected]> AuthorDate: Wed, 31 Jul 2019 12:37:15 +0200 Committer: Thomas Gleixner <[email protected]> CommitDate: Thu, 1 Aug 2019 17:43:20 +0200
sched/deadline: Ensure inactive_timer runs in hardirq context
SCHED_DEADLINE inactive timer needs to run in hardirq context (as dl_task_timer already does) on PREEMPT_RT
Change the mode to HRTIMER_MODE_REL_HARD.
[ tglx: Fixed up the start site, so mode debugging works ]
--- kernel/sched/deadline.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/sched/deadline.c +2 -2
@@ -287,7 +287,7 @@ static void task_non_contending(struct task_struct *p) dl_se->dl_non_contending =1 ;get_task_struct (p); -hrtimer_start (timer,ns_to_ktime (zerolag_time),HRTIMER_MODE_REL ); +hrtimer_start (timer,ns_to_ktime (zerolag_time),HRTIMER_MODE_REL_HARD ); }static void task_contending (struct sched_dl_entity *dl_se,int flags)
@@ -1292,7 +1292,7 @@ void init_dl_inactive_task_timer(struct sched_dl_entity *dl_se) {struct hrtimer *timer = &dl_se->inactive_timer; -hrtimer_init (timer,CLOCK_MONOTONIC ,HRTIMER_MODE_REL ); +hrtimer_init (timer,CLOCK_MONOTONIC ,HRTIMER_MODE_REL_HARD ); timer->function = inactive_task_timer; }
tip-bot for Juri Lelli
merge bot[tip:timers/core] sched/deadline: Ensure inactive_timer runs in hardirq context
In reply to Juri Lellisched/deadline: Ensure inactive_timer runs in hardirq context
Commit-ID: 850377a875a481c393ce59111b0c9725005e0eb4 Gitweb: https://git.kernel.org/tip/850377a875a481c393ce59111b0c9725005e0eb4 Author: Juri Lelli <[email protected]> AuthorDate: Wed, 31 Jul 2019 12:37:15 +0200 Committer: Thomas Gleixner <[email protected]> CommitDate: Thu, 1 Aug 2019 20:51:22 +0200
sched/deadline: Ensure inactive_timer runs in hardirq context
SCHED_DEADLINE inactive timer needs to run in hardirq context (as dl_task_timer already does) on PREEMPT_RT
Change the mode to HRTIMER_MODE_REL_HARD.
[ tglx: Fixed up the start site, so mode debugging works ]
--- kernel/sched/deadline.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/sched/deadline.c +2 -2
@@ -287,7 +287,7 @@ static void task_non_contending(struct task_struct *p) dl_se->dl_non_contending =1 ;get_task_struct (p); -hrtimer_start (timer,ns_to_ktime (zerolag_time),HRTIMER_MODE_REL ); +hrtimer_start (timer,ns_to_ktime (zerolag_time),HRTIMER_MODE_REL_HARD ); }static void task_contending (struct sched_dl_entity *dl_se,int flags)
@@ -1292,7 +1292,7 @@ void init_dl_inactive_task_timer(struct sched_dl_entity *dl_se) {struct hrtimer *timer = &dl_se->inactive_timer; -hrtimer_init (timer,CLOCK_MONOTONIC ,HRTIMER_MODE_REL ); +hrtimer_init (timer,CLOCK_MONOTONIC ,HRTIMER_MODE_REL_HARD ); timer->function = inactive_task_timer; }
Quoted 1 line · Juri Lelli
Hi,
Hi,
Quoted 5 lines
Both v4.19-rt and v5.2-rt need this.
Mainline "sched: Mark hrtimers to expire in hard interrupt context" series needs this as well ([email protected] in particular). Do I need to send out a separate patch for it?
time will show. I applied it now to my tree and will ping tglx later…
Quoted 3 lines
Best,
Juri
Sebastian
Juri Lelli
maintainerQuoted 11 lines · Sebastian Andrzej Siewior
Quoted 1 line · Juri Lelli
Hi,
Hi,
Quoted 5 lines
Both v4.19-rt and v5.2-rt need this.
Mainline "sched: Mark hrtimers to expire in hard interrupt context" series needs this as well ([email protected] in particular). Do I need to send out a separate patch for it?
time will show. I applied it now to my tree and will ping tglx later…
Thanks. tglx actually already applied it to tip (with a fixup):
Best,
Juri