* [RT PATCH] sched/deadline: Make inactive timer run in hardirq context
@ 2019-07-31 10:37 Juri Lelli
2019-07-31 11:07 ` [tip:timers/core] sched/deadline: Ensure inactive_timer runs " tip-bot for Juri Lelli
` (5 more replies)
0 siblings, 6 replies; 8+ messages in thread
From: Juri Lelli @ 2019-07-31 10:37 UTC (permalink / raw)
To: tglx, bigeasy, rostedt
Cc: linux-rt-users, peterz, linux-kernel, bristot, williams, Juri Lelli
SCHED_DEADLINE inactive timer needs to run in hardirq context (as
dl_task_timer already does).
Make it HRTIMER_MODE_REL_HARD.
Signed-off-by: Juri Lelli <juri.lelli@redhat.com>
---
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 (20190726185753.077004842@linutronix.de 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(-)
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index 1794e152d888..0889674b8915 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -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;
}
--
2.17.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [tip:timers/core] sched/deadline: Ensure inactive_timer runs in hardirq context
2019-07-31 10:37 [RT PATCH] sched/deadline: Make inactive timer run in hardirq context Juri Lelli
@ 2019-07-31 11:07 ` tip-bot for Juri Lelli
2019-07-31 11:56 ` [RT PATCH] sched/deadline: Make inactive timer run " Daniel Bristot de Oliveira
` (4 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: tip-bot for Juri Lelli @ 2019-07-31 11:07 UTC (permalink / raw)
To: linux-tip-commits; +Cc: linux-kernel, mingo, hpa, tglx, juri.lelli
Commit-ID: b223cc1bb098ebd1077a5390c434db411806d6b8
Gitweb: https://git.kernel.org/tip/b223cc1bb098ebd1077a5390c434db411806d6b8
Author: Juri Lelli <juri.lelli@redhat.com>
AuthorDate: Wed, 31 Jul 2019 12:37:15 +0200
Committer: Thomas Gleixner <tglx@linutronix.de>
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 ]
Signed-off-by: Juri Lelli <juri.lelli@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20190731103715.4047-1-juri.lelli@redhat.com
---
kernel/sched/deadline.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index 0359612d5443..83a663a34196 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -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;
}
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [RT PATCH] sched/deadline: Make inactive timer run in hardirq context
2019-07-31 10:37 [RT PATCH] sched/deadline: Make inactive timer run in hardirq context Juri Lelli
2019-07-31 11:07 ` [tip:timers/core] sched/deadline: Ensure inactive_timer runs " tip-bot for Juri Lelli
@ 2019-07-31 11:56 ` Daniel Bristot de Oliveira
2019-07-31 14:25 ` Clark Williams
` (3 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Daniel Bristot de Oliveira @ 2019-07-31 11:56 UTC (permalink / raw)
To: Juri Lelli, tglx, bigeasy, rostedt
Cc: linux-rt-users, peterz, linux-kernel, bristot, williams
On 31/07/2019 12:37, Juri Lelli wrote:
> SCHED_DEADLINE inactive timer needs to run in hardirq context (as
> dl_task_timer already does).
>
> Make it HRTIMER_MODE_REL_HARD.
>
> Signed-off-by: Juri Lelli <juri.lelli@redhat.com>
Acked-by: Daniel Bristot de Oliveira <bristot@redhat.com>
-- Daniel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RT PATCH] sched/deadline: Make inactive timer run in hardirq context
2019-07-31 10:37 [RT PATCH] sched/deadline: Make inactive timer run in hardirq context Juri Lelli
2019-07-31 11:07 ` [tip:timers/core] sched/deadline: Ensure inactive_timer runs " tip-bot for Juri Lelli
2019-07-31 11:56 ` [RT PATCH] sched/deadline: Make inactive timer run " Daniel Bristot de Oliveira
@ 2019-07-31 14:25 ` Clark Williams
2019-08-01 16:00 ` [tip:timers/core] sched/deadline: Ensure inactive_timer runs " tip-bot for Juri Lelli
` (2 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Clark Williams @ 2019-07-31 14:25 UTC (permalink / raw)
To: Juri Lelli
Cc: tglx, bigeasy, rostedt, linux-rt-users, peterz, linux-kernel, bristot
On Wed, 31 Jul 2019 12:37:15 +0200
Juri Lelli <juri.lelli@redhat.com> wrote:
> SCHED_DEADLINE inactive timer needs to run in hardirq context (as
> dl_task_timer already does).
>
> Make it HRTIMER_MODE_REL_HARD.
>
> Signed-off-by: Juri Lelli <juri.lelli@redhat.com>
> ---
> 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 (20190726185753.077004842@linutronix.de 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(-)
>
> diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
> index 1794e152d888..0889674b8915 100644
> --- a/kernel/sched/deadline.c
> +++ b/kernel/sched/deadline.c
> @@ -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;
> }
>
> --
> 2.17.2
>
Acked-by: Clark Williams <williams@redhat.com>
--
The United States Coast Guard
Ruining Natural Selection since 1790
^ permalink raw reply [flat|nested] 8+ messages in thread
* [tip:timers/core] sched/deadline: Ensure inactive_timer runs in hardirq context
2019-07-31 10:37 [RT PATCH] sched/deadline: Make inactive timer run in hardirq context Juri Lelli
` (2 preceding siblings ...)
2019-07-31 14:25 ` Clark Williams
@ 2019-08-01 16:00 ` tip-bot for Juri Lelli
2019-08-01 19:05 ` tip-bot for Juri Lelli
2019-08-13 13:09 ` [RT PATCH] sched/deadline: Make inactive timer run " Sebastian Andrzej Siewior
5 siblings, 0 replies; 8+ messages in thread
From: tip-bot for Juri Lelli @ 2019-08-01 16:00 UTC (permalink / raw)
To: linux-tip-commits; +Cc: linux-kernel, juri.lelli, hpa, mingo, tglx
Commit-ID: 4394ba872c36255d25c6bde151b061f04655ebfb
Gitweb: https://git.kernel.org/tip/4394ba872c36255d25c6bde151b061f04655ebfb
Author: Juri Lelli <juri.lelli@redhat.com>
AuthorDate: Wed, 31 Jul 2019 12:37:15 +0200
Committer: Thomas Gleixner <tglx@linutronix.de>
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 ]
Signed-off-by: Juri Lelli <juri.lelli@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20190731103715.4047-1-juri.lelli@redhat.com
---
kernel/sched/deadline.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index 0359612d5443..83a663a34196 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -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;
}
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [tip:timers/core] sched/deadline: Ensure inactive_timer runs in hardirq context
2019-07-31 10:37 [RT PATCH] sched/deadline: Make inactive timer run in hardirq context Juri Lelli
` (3 preceding siblings ...)
2019-08-01 16:00 ` [tip:timers/core] sched/deadline: Ensure inactive_timer runs " tip-bot for Juri Lelli
@ 2019-08-01 19:05 ` tip-bot for Juri Lelli
2019-08-13 13:09 ` [RT PATCH] sched/deadline: Make inactive timer run " Sebastian Andrzej Siewior
5 siblings, 0 replies; 8+ messages in thread
From: tip-bot for Juri Lelli @ 2019-08-01 19:05 UTC (permalink / raw)
To: linux-tip-commits; +Cc: juri.lelli, linux-kernel, hpa, tglx, mingo
Commit-ID: 850377a875a481c393ce59111b0c9725005e0eb4
Gitweb: https://git.kernel.org/tip/850377a875a481c393ce59111b0c9725005e0eb4
Author: Juri Lelli <juri.lelli@redhat.com>
AuthorDate: Wed, 31 Jul 2019 12:37:15 +0200
Committer: Thomas Gleixner <tglx@linutronix.de>
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 ]
Signed-off-by: Juri Lelli <juri.lelli@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20190731103715.4047-1-juri.lelli@redhat.com
---
kernel/sched/deadline.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index 0359612d5443..83a663a34196 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -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;
}
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [RT PATCH] sched/deadline: Make inactive timer run in hardirq context
2019-07-31 10:37 [RT PATCH] sched/deadline: Make inactive timer run in hardirq context Juri Lelli
` (4 preceding siblings ...)
2019-08-01 19:05 ` tip-bot for Juri Lelli
@ 2019-08-13 13:09 ` Sebastian Andrzej Siewior
2019-08-13 13:19 ` Juri Lelli
5 siblings, 1 reply; 8+ messages in thread
From: Sebastian Andrzej Siewior @ 2019-08-13 13:09 UTC (permalink / raw)
To: Juri Lelli
Cc: tglx, rostedt, linux-rt-users, peterz, linux-kernel, bristot, williams
On 2019-07-31 12:37:15 [+0200], Juri Lelli wrote:
> Hi,
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 (20190726185753.077004842@linutronix.de 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…
> Best,
>
> Juri
Sebastian
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RT PATCH] sched/deadline: Make inactive timer run in hardirq context
2019-08-13 13:09 ` [RT PATCH] sched/deadline: Make inactive timer run " Sebastian Andrzej Siewior
@ 2019-08-13 13:19 ` Juri Lelli
0 siblings, 0 replies; 8+ messages in thread
From: Juri Lelli @ 2019-08-13 13:19 UTC (permalink / raw)
To: Sebastian Andrzej Siewior
Cc: tglx, rostedt, linux-rt-users, peterz, linux-kernel, bristot, williams
On 13/08/19 15:09, Sebastian Andrzej Siewior wrote:
> On 2019-07-31 12:37:15 [+0200], Juri Lelli wrote:
> > Hi,
> 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 (20190726185753.077004842@linutronix.de 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):
https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=4394ba872c36255d25c6bde151b061f04655ebfb
Best,
Juri
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-08-13 13:20 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-31 10:37 [RT PATCH] sched/deadline: Make inactive timer run in hardirq context Juri Lelli
2019-07-31 11:07 ` [tip:timers/core] sched/deadline: Ensure inactive_timer runs " tip-bot for Juri Lelli
2019-07-31 11:56 ` [RT PATCH] sched/deadline: Make inactive timer run " Daniel Bristot de Oliveira
2019-07-31 14:25 ` Clark Williams
2019-08-01 16:00 ` [tip:timers/core] sched/deadline: Ensure inactive_timer runs " tip-bot for Juri Lelli
2019-08-01 19:05 ` tip-bot for Juri Lelli
2019-08-13 13:09 ` [RT PATCH] sched/deadline: Make inactive timer run " Sebastian Andrzej Siewior
2019-08-13 13:19 ` Juri Lelli
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.