[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKfTPtD_QzYVeTbQ-j2mOsKmCcjUaxo403M_HYCWbT2RjjGb7w@mail.gmail.com>
Date: Tue, 13 Aug 2024 09:54:08 +0200
From: Vincent Guittot <vincent.guittot@...aro.org>
To: Juri Lelli <juri.lelli@...hat.com>
Cc: Qais Yousef <qyousef@...alina.io>, Christian Loehle <christian.loehle@....com>,
"Rafael J. Wysocki" <rafael@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, linux-pm@...r.kernel.org,
Ingo Molnar <mingo@...nel.org>, Peter Zijlstra <peterz@...radead.org>,
Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [PATCH] sched/cpufreq: Use USEC_PER_SEC for deadline task
On Fri, 9 Aug 2024 at 09:42, Juri Lelli <juri.lelli@...hat.com> wrote:
>
> On 09/08/24 02:24, Qais Yousef wrote:
> > Adding more sched folks to CC
> >
> > On 08/06/24 14:41, Christian Loehle wrote:
> > > Convert the sugov deadline task attributes to use the available
> > > definitions to make them more readable.
> > > No functional change.
> > >
> > > Signed-off-by: Christian Loehle <christian.loehle@....com>
> > > ---
> > > kernel/sched/cpufreq_schedutil.c | 6 +++---
> > > 1 file changed, 3 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c
> > > index eece6244f9d2..012b38a04894 100644
> > > --- a/kernel/sched/cpufreq_schedutil.c
> > > +++ b/kernel/sched/cpufreq_schedutil.c
> > > @@ -654,9 +654,9 @@ static int sugov_kthread_create(struct sugov_policy *sg_policy)
> > > * Fake (unused) bandwidth; workaround to "fix"
> > > * priority inheritance.
> > > */
> > > - .sched_runtime = 1000000,
> > > - .sched_deadline = 10000000,
> > > - .sched_period = 10000000,
> > > + .sched_runtime = USEC_PER_SEC,
> > > + .sched_deadline = 10 * USEC_PER_SEC,
> > > + .sched_period = 10 * USEC_PER_SEC,
> >
> > I think NSEC_PER_MSEC is the correct one. The units in
> > include/uapi/linux/sched/types.h is not specified. Had to look at
> > sched-deadline.rst to figure it out.
>
> In practice it's the same number :). But, you are correct, we want
> 1ms/10ms and unit is nanoseconds, so NSEC_PER_MSEC.
Yes NSEC_PER_MSEC is the correct unit
>
Powered by blists - more mailing lists