[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6281126b-3b93-86fa-25d6-d637b6c7dd87@arm.com>
Date: Fri, 2 Sep 2022 09:53:22 +0200
From: Dietmar Eggemann <dietmar.eggemann@....com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Ingo Molnar <mingo@...nel.org>,
Vincent Guittot <vincent.guittot@...aro.org>,
Morten Rasmussen <morten.rasmussen@....com>,
Vincent Donnefort <vdonnefort@...gle.com>,
Quentin Perret <qperret@...gle.com>,
Patrick Bellasi <patrick.bellasi@...bug.net>,
Abhijeet Dharmapurikar <adharmap@...cinc.com>,
Jian-Min <Jian-Min.Liu@...iatek.com>,
Qais Yousef <qais.yousef@....com>, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 1/1] sched/pelt: Introduce PELT multiplier
On 29/08/2022 12:02, Peter Zijlstra wrote:
> On Mon, Aug 29, 2022 at 10:08:13AM +0200, Peter Zijlstra wrote:
>> On Mon, Aug 29, 2022 at 07:54:50AM +0200, Dietmar Eggemann wrote:
>>> From: Vincent Donnefort <vincent.donnefort@....com>
[...]
>>> +extern unsigned int sched_pelt_lshift;
>>> +
>>> +/*
>>> + * absolute time |1 |2 |3 |4 |5 |6 |
>>> + * @ mult = 1 --------****************--------****************-
>>> + * @ mult = 2 --------********----------------********---------
>>> + * @ mult = 4 --------****--------------------****-------------
>>> + * clock task mult
>>> + * @ mult = 2 | | |2 |3 | | | | |5 |6 | | |
>>> + * @ mult = 4 | | | | |2|3| | | | | | | | | | |5|6| | | | | | |
>>> + *
>>> + */
>>> +static inline void update_rq_clock_task_mult(struct rq *rq, s64 delta)
>>> +{
>>> + delta <<= READ_ONCE(sched_pelt_lshift);
>>> +
>>> + rq->clock_task_mult += delta;
>>> +
>>> + update_rq_clock_pelt(rq, delta);
>>> +}
>>
>> Hurmph... I'd almost go write you something like
>> static_call()/static_branch() but for immediates.
>>
>> That said; given there's only like 3 options, perhaps a few
>> static_branch() instances work just fine ?
>
> Also, I'm not at all sure about exposing that as an official sysctl.
>
> How about something like so?
[...]
> void update_rq_clock(struct rq *rq)
> --- a/kernel/sched/features.h
> +++ b/kernel/sched/features.h
> @@ -101,3 +101,6 @@ SCHED_FEAT(LATENCY_WARN, false)
>
> SCHED_FEAT(ALT_PERIOD, true)
> SCHED_FEAT(BASE_SLICE, true)
> +
> +SCHED_FEAT(PELT_M2, false)
> +SCHED_FEAT(PELT_M4, false)
The sched features interface would definitely be much less official but
I think it's not useful for Android since they don't mount debugfs anymore.
[...]
Powered by blists - more mailing lists