linux-mediatek.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sched/deadline: Add DL server activated message
@ 2025-08-05 15:53 Kuyo Chang
  2025-08-07  7:15 ` Juri Lelli
  0 siblings, 1 reply; 4+ messages in thread
From: Kuyo Chang @ 2025-08-05 15:53 UTC (permalink / raw)
  To: Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
	Dietmar Eggemann, Steven Rostedt, Ben Segall, Mel Gorman,
	Valentin Schneider, Matthias Brugger, AngeloGioacchino Del Regno
  Cc: kuyo chang, linux-kernel, linux-arm-kernel, linux-mediatek

From: kuyo chang <kuyo.chang@mediatek.com>

The DL server is introduced as a replacement for realtime throttling.
When RT throttling is activated, a message
"sched: RT throttling activated" is shown. However, it is currently
difficult for users to know when the DL server is activated.

This patch adds a similar message to indicate when the DL server
is activated, which helps users debug RT/CFS contention issues.

Signed-off-by: kuyo chang <kuyo.chang@mediatek.com>
---
 kernel/sched/deadline.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index e2d51f4306b3..8e0de6cdb980 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -2042,6 +2042,9 @@ enqueue_dl_entity(struct sched_dl_entity *dl_se, int flags)
 	}
 
 	__enqueue_dl_entity(dl_se);
+
+	if (dl_server(dl_se))
+		printk_deferred_once("sched: dl_server activated\n");
 }
 
 static void dequeue_dl_entity(struct sched_dl_entity *dl_se, int flags)
-- 
2.45.2



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] sched/deadline: Add DL server activated message
  2025-08-05 15:53 [PATCH] sched/deadline: Add DL server activated message Kuyo Chang
@ 2025-08-07  7:15 ` Juri Lelli
  2025-08-07  7:52   ` Kuyo Chang
  0 siblings, 1 reply; 4+ messages in thread
From: Juri Lelli @ 2025-08-07  7:15 UTC (permalink / raw)
  To: Kuyo Chang
  Cc: Ingo Molnar, Peter Zijlstra, Vincent Guittot, Dietmar Eggemann,
	Steven Rostedt, Ben Segall, Mel Gorman, Valentin Schneider,
	Matthias Brugger, AngeloGioacchino Del Regno, linux-kernel,
	linux-arm-kernel, linux-mediatek

Hi,

On 05/08/25 23:53, Kuyo Chang wrote:
> From: kuyo chang <kuyo.chang@mediatek.com>
> 
> The DL server is introduced as a replacement for realtime throttling.
> When RT throttling is activated, a message
> "sched: RT throttling activated" is shown. However, it is currently
> difficult for users to know when the DL server is activated.
> 
> This patch adds a similar message to indicate when the DL server
> is activated, which helps users debug RT/CFS contention issues.
> 
> Signed-off-by: kuyo chang <kuyo.chang@mediatek.com>
> ---
>  kernel/sched/deadline.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
> index e2d51f4306b3..8e0de6cdb980 100644
> --- a/kernel/sched/deadline.c
> +++ b/kernel/sched/deadline.c
> @@ -2042,6 +2042,9 @@ enqueue_dl_entity(struct sched_dl_entity *dl_se, int flags)
>  	}
>  
>  	__enqueue_dl_entity(dl_se);
> +
> +	if (dl_server(dl_se))
> +		printk_deferred_once("sched: dl_server activated\n");
>  }

Not sure if we want/need this, but, if we do, I believe
fair_server_pick_task() might be a better place to put it, as it's
really when the dl-server is called to do its job.

Thanks,
Juri



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] sched/deadline: Add DL server activated message
  2025-08-07  7:15 ` Juri Lelli
@ 2025-08-07  7:52   ` Kuyo Chang
  2025-08-07 13:23     ` Juri Lelli
  0 siblings, 1 reply; 4+ messages in thread
From: Kuyo Chang @ 2025-08-07  7:52 UTC (permalink / raw)
  To: Juri Lelli
  Cc: Ingo Molnar, Peter Zijlstra, Vincent Guittot, Dietmar Eggemann,
	Steven Rostedt, Ben Segall, Mel Gorman, Valentin Schneider,
	Matthias Brugger, AngeloGioacchino Del Regno, linux-kernel,
	linux-arm-kernel, linux-mediatek

On Thu, 2025-08-07 at 08:15 +0100, Juri Lelli wrote:
> 
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
> 
> 
> Hi,
> 
> On 05/08/25 23:53, Kuyo Chang wrote:
> > From: kuyo chang <kuyo.chang@mediatek.com>
> > 
> > The DL server is introduced as a replacement for realtime
> > throttling.
> > When RT throttling is activated, a message
> > "sched: RT throttling activated" is shown. However, it is currently
> > difficult for users to know when the DL server is activated.
> > 
> > This patch adds a similar message to indicate when the DL server
> > is activated, which helps users debug RT/CFS contention issues.
> > 
> > Signed-off-by: kuyo chang <kuyo.chang@mediatek.com>
> > ---
> >  kernel/sched/deadline.c | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
> > index e2d51f4306b3..8e0de6cdb980 100644
> > --- a/kernel/sched/deadline.c
> > +++ b/kernel/sched/deadline.c
> > @@ -2042,6 +2042,9 @@ enqueue_dl_entity(struct sched_dl_entity
> > *dl_se, int flags)
> >       }
> > 
> >       __enqueue_dl_entity(dl_se);
> > +
> > +     if (dl_server(dl_se))
> > +             printk_deferred_once("sched: dl_server activated\n");
> >  }
> 
> Not sure if we want/need this, but, if we do, I believe
> fair_server_pick_task() might be a better place to put it, as it's
> really when the dl-server is called to do its job.
> 

Thanks for your suggestion, maybe the minor patch as below

diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index e2d51f4306b3..82d1091e56f5 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -2395,6 +2395,7 @@ static struct task_struct *__pick_task_dl(struct
rq *rq)
 			goto again;
 		}
 		rq->dl_server = dl_se;
+		printk_deferred_once("sched: dl_server activated\n");
 	} else {
 		p = dl_task_of(dl_se);
 	}
-- 

I believe the debug message could help to verify that the DL server is
actually working.
It will be a great help for users to debug RT/FAIR contention issues
when this clue message occurs.

> Thanks,
> Juri
> 



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] sched/deadline: Add DL server activated message
  2025-08-07  7:52   ` Kuyo Chang
@ 2025-08-07 13:23     ` Juri Lelli
  0 siblings, 0 replies; 4+ messages in thread
From: Juri Lelli @ 2025-08-07 13:23 UTC (permalink / raw)
  To: Kuyo Chang
  Cc: Ingo Molnar, Peter Zijlstra, Vincent Guittot, Dietmar Eggemann,
	Steven Rostedt, Ben Segall, Mel Gorman, Valentin Schneider,
	Matthias Brugger, AngeloGioacchino Del Regno, linux-kernel,
	linux-arm-kernel, linux-mediatek

On 07/08/25 15:52, Kuyo Chang wrote:
> On Thu, 2025-08-07 at 08:15 +0100, Juri Lelli wrote:
> > 
> > External email : Please do not click links or open attachments until
> > you have verified the sender or the content.
> > 
> > 
> > Hi,
> > 
> > On 05/08/25 23:53, Kuyo Chang wrote:
> > > From: kuyo chang <kuyo.chang@mediatek.com>
> > > 
> > > The DL server is introduced as a replacement for realtime
> > > throttling.
> > > When RT throttling is activated, a message
> > > "sched: RT throttling activated" is shown. However, it is currently
> > > difficult for users to know when the DL server is activated.
> > > 
> > > This patch adds a similar message to indicate when the DL server
> > > is activated, which helps users debug RT/CFS contention issues.
> > > 
> > > Signed-off-by: kuyo chang <kuyo.chang@mediatek.com>
> > > ---
> > >  kernel/sched/deadline.c | 3 +++
> > >  1 file changed, 3 insertions(+)
> > > 
> > > diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
> > > index e2d51f4306b3..8e0de6cdb980 100644
> > > --- a/kernel/sched/deadline.c
> > > +++ b/kernel/sched/deadline.c
> > > @@ -2042,6 +2042,9 @@ enqueue_dl_entity(struct sched_dl_entity
> > > *dl_se, int flags)
> > >       }
> > > 
> > >       __enqueue_dl_entity(dl_se);
> > > +
> > > +     if (dl_server(dl_se))
> > > +             printk_deferred_once("sched: dl_server activated\n");
> > >  }
> > 
> > Not sure if we want/need this, but, if we do, I believe
> > fair_server_pick_task() might be a better place to put it, as it's
> > really when the dl-server is called to do its job.
> > 
> 
> Thanks for your suggestion, maybe the minor patch as below
> 
> diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
> index e2d51f4306b3..82d1091e56f5 100644
> --- a/kernel/sched/deadline.c
> +++ b/kernel/sched/deadline.c
> @@ -2395,6 +2395,7 @@ static struct task_struct *__pick_task_dl(struct
> rq *rq)
>  			goto again;
>  		}
>  		rq->dl_server = dl_se;
> +		printk_deferred_once("sched: dl_server activated\n");

Guess it could work. If we are going to add this, maybe printing
information about the task dl-server is servicing might also be
interesting.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-08-07 13:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-05 15:53 [PATCH] sched/deadline: Add DL server activated message Kuyo Chang
2025-08-07  7:15 ` Juri Lelli
2025-08-07  7:52   ` Kuyo Chang
2025-08-07 13:23     ` Juri Lelli

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).