All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: YT Chang <yt.chang@mediatek.com>
Cc: Ingo Molnar <mingo@redhat.com>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
	Daniel Bristot de Oliveira <bristot@redhat.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, wsd_upstream@mediatek.com
Subject: Re: [PATCH 1/1] sched: Add update_rq_clock() in sched_rt_rq_enqueue()
Date: Mon, 7 Feb 2022 11:48:45 +0100	[thread overview]
Message-ID: <20220207104845.GD23216@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <20211224012239.4694-1-yt.chang@mediatek.com>

On Fri, Dec 24, 2021 at 09:22:39AM +0800, YT Chang wrote:
> 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
> 
> Signed-off-by: YT Chang <yt.chang@mediatek.com>
> Change-Id: I4fba5a561b7064aafa991d7f1a34431607779cb4

Change-Id does not belong in kernel patches..

> ---
>  kernel/sched/rt.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
> index b48baaba2fc2..faf1a68c0723 100644
> --- a/kernel/sched/rt.c
> +++ b/kernel/sched/rt.c
> @@ -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.

>  	rt_se = rt_rq->tg->rt_se[cpu];
>  
>  	if (rt_rq->rt_nr_running) {
> -- 
> 2.18.0
> 

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

WARNING: multiple messages have this Message-ID (diff)
From: Peter Zijlstra <peterz@infradead.org>
To: YT Chang <yt.chang@mediatek.com>
Cc: Ingo Molnar <mingo@redhat.com>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
	Daniel Bristot de Oliveira <bristot@redhat.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, wsd_upstream@mediatek.com
Subject: Re: [PATCH 1/1] sched: Add update_rq_clock() in sched_rt_rq_enqueue()
Date: Mon, 7 Feb 2022 11:48:45 +0100	[thread overview]
Message-ID: <20220207104845.GD23216@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <20211224012239.4694-1-yt.chang@mediatek.com>

On Fri, Dec 24, 2021 at 09:22:39AM +0800, YT Chang wrote:
> 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
> 
> Signed-off-by: YT Chang <yt.chang@mediatek.com>
> Change-Id: I4fba5a561b7064aafa991d7f1a34431607779cb4

Change-Id does not belong in kernel patches..

> ---
>  kernel/sched/rt.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
> index b48baaba2fc2..faf1a68c0723 100644
> --- a/kernel/sched/rt.c
> +++ b/kernel/sched/rt.c
> @@ -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.

>  	rt_se = rt_rq->tg->rt_se[cpu];
>  
>  	if (rt_rq->rt_nr_running) {
> -- 
> 2.18.0
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Peter Zijlstra <peterz@infradead.org>
To: YT Chang <yt.chang@mediatek.com>
Cc: Ingo Molnar <mingo@redhat.com>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
	Daniel Bristot de Oliveira <bristot@redhat.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, wsd_upstream@mediatek.com
Subject: Re: [PATCH 1/1] sched: Add update_rq_clock() in sched_rt_rq_enqueue()
Date: Mon, 7 Feb 2022 11:48:45 +0100	[thread overview]
Message-ID: <20220207104845.GD23216@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <20211224012239.4694-1-yt.chang@mediatek.com>

On Fri, Dec 24, 2021 at 09:22:39AM +0800, YT Chang wrote:
> 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
> 
> Signed-off-by: YT Chang <yt.chang@mediatek.com>
> Change-Id: I4fba5a561b7064aafa991d7f1a34431607779cb4

Change-Id does not belong in kernel patches..

> ---
>  kernel/sched/rt.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
> index b48baaba2fc2..faf1a68c0723 100644
> --- a/kernel/sched/rt.c
> +++ b/kernel/sched/rt.c
> @@ -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.

>  	rt_se = rt_rq->tg->rt_se[cpu];
>  
>  	if (rt_rq->rt_nr_running) {
> -- 
> 2.18.0
> 

  reply	other threads:[~2022-02-07 10:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-24  1:22 [PATCH 1/1] sched: Add update_rq_clock() in sched_rt_rq_enqueue() YT Chang
2021-12-24  1:22 ` YT Chang
2021-12-24  1:22 ` YT Chang
2022-02-07 10:48 ` Peter Zijlstra [this message]
2022-02-07 10:48   ` Peter Zijlstra
2022-02-07 10:48   ` Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220207104845.GD23216@worktop.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=bristot@redhat.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=vincent.guittot@linaro.org \
    --cc=wsd_upstream@mediatek.com \
    --cc=yt.chang@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.