Skip to contentSkip to conversation

sched: Add update_rq_clock() in sched_rt_rq_enqueue()

PATCH In review YT Chang 2 participants 2 messages Dec 24, 2021 – Feb 7, 2022

Subsystems (2)
lore
Share & tools
lore

YT Chang

author
#0 lore raw

PATCH 1/1 sched: Add update_rq_clock() in sched_rt_rq_enqueue()

Add update_rq_clock() in sched_rt_rq_enqueue() to prevent the warning "rq->clock_update_flags < RQCF_ACT_SKIP" when call rq_clock() in cpufreq_update_util().

sched_rt_rq_enqueue ->
enqueue_top_rt_rq ->

      cpufreq_update_util ->
         rq_clock ->
            assert_clock_updated
Change-Id I4fba5a561b7064aafa991d7f1a34431607779cb4
---
 kernel/sched/rt.c | 1 +
 1 file changed, 1 insertion(+)
kernel/sched/rt.c +1 -0
index b48baaba2fc2..faf1a68c0723 100644
@@ -539,6 +539,7 @@ static void sched_rt_rq_enqueue(struct rt_rq *rt_rq)
 
 	int cpu = cpu_of(rq);
 
+	update_rq_clock(rq);
 	rt_se = rt_rq->tg->rt_se[cpu];
 
 	if (rt_rq->rt_nr_running) {
Signature · 1 line
2.18.0
maintainer
#1 lore raw
Quoted 4 lines · YT Chang

Add update_rq_clock() in sched_rt_rq_enqueue() to prevent the warning "rq->clock_update_flags < RQCF_ACT_SKIP" when call rq_clock() in cpufreq_update_util().

Quoted 8 lines

sched_rt_rq_enqueue ->
enqueue_top_rt_rq ->

      cpufreq_update_util ->
         rq_clock ->
            assert_clock_updated
Change-Id I4fba5a561b7064aafa991d7f1a34431607779cb4

Change-Id does not belong in kernel patches..

kernel/sched/rt.c static void sched_rt_rq_enqueue(struct rt_rq *rt_rq) · line 542

Quoted 13 lines
---
 kernel/sched/rt.c | 1 +
 1 file changed, 1 insertion(+)
kernel/sched/rt.c +1 -0
index b48baaba2fc2..faf1a68c0723 100644
@@ -539,6 +539,7 @@ static void sched_rt_rq_enqueue(struct rt_rq *rt_rq)
 
 	int cpu = cpu_of(rq);
 
+	update_rq_clock(rq);

This isn't right I think; there's at least one caller of this function that already did that. A double clock update is also wrong. Each path should have just one.

Quoted 6 lines
kernel/sched/rt.c +0 -0
 	rt_se = rt_rq->tg->rt_se[cpu];
 
 	if (rt_rq->rt_nr_running) {
Signature · 1 line
2.18.0

_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek