mbox series

[v3,0/2] Improvements to the Tegra CPUFREQ driver

Message ID 20231004140537.1954-1-sumitg@nvidia.com (mailing list archive)
Headers show
Series Improvements to the Tegra CPUFREQ driver | expand

Message

Sumit Gupta Oct. 4, 2023, 2:05 p.m. UTC
This patch set adds below improvements to the Tegra194 CPUFREQ driver.
They are applicable to all the Tegra SoC's supported by the driver.

1) Patch 1: Avoid making SMP call on every frequency request to reduce
   the time for frequency set and get calls.

2) Patch 2: Use reference clock count based loop instead of udelay()
   to improve the accuracy of re-generated CPU frequency.

The patches are not related but have minor conflict. So, need to be
applied in order of patch numbers. If 'Patch 2' is to be applied first
then will rebase that and send separately.

---
v1[2] -> v3:
- Patch 1: used sizeof(*data->cpu_data) in devm_kcalloc(). 

v1[1] -> v2:
- Patch 1: added new patch.
- Patch 2: changed subject and patch order.

Sumit Gupta (2):
  cpufreq: tegra194: save CPU data to avoid repeated SMP calls
  cpufreq: tegra194: use refclk delta based loop instead of udelay

 drivers/cpufreq/tegra194-cpufreq.c | 151 ++++++++++++++++++++---------
 1 file changed, 106 insertions(+), 45 deletions(-)

[2] https://lore.kernel.org/lkml/20230901164113.29139-1-sumitg@nvidia.com/
[1] https://lore.kernel.org/lkml/20230901152046.25662-1-sumitg@nvidia.com/

Comments

Sumit Gupta Oct. 9, 2023, 11:36 a.m. UTC | #1
On 04/10/23 19:35, Sumit Gupta wrote:
> This patch set adds below improvements to the Tegra194 CPUFREQ driver.
> They are applicable to all the Tegra SoC's supported by the driver.
> 
> 1) Patch 1: Avoid making SMP call on every frequency request to reduce
>     the time for frequency set and get calls.
> 
> 2) Patch 2: Use reference clock count based loop instead of udelay()
>     to improve the accuracy of re-generated CPU frequency.
> 
> The patches are not related but have minor conflict. So, need to be
> applied in order of patch numbers. If 'Patch 2' is to be applied first
> then will rebase that and send separately.
> 
> ---
> v1[2] -> v3:
> - Patch 1: used sizeof(*data->cpu_data) in devm_kcalloc().
> 
> v1[1] -> v2:
> - Patch 1: added new patch.
> - Patch 2: changed subject and patch order.
> 
> Sumit Gupta (2):
>    cpufreq: tegra194: save CPU data to avoid repeated SMP calls
>    cpufreq: tegra194: use refclk delta based loop instead of udelay
> 
>   drivers/cpufreq/tegra194-cpufreq.c | 151 ++++++++++++++++++++---------
>   1 file changed, 106 insertions(+), 45 deletions(-)
> 
> [2] https://lore.kernel.org/lkml/20230901164113.29139-1-sumitg@nvidia.com/
> [1] https://lore.kernel.org/lkml/20230901152046.25662-1-sumitg@nvidia.com/
> 

Hi Viresh,

If there is no further comment.
Can we please still apply these patches for 6.7 ?

Best Regards,
Sumit Gupta
Viresh Kumar Oct. 10, 2023, 5:37 a.m. UTC | #2
On 09-10-23, 17:06, Sumit Gupta wrote:
> 
> 
> On 04/10/23 19:35, Sumit Gupta wrote:
> > This patch set adds below improvements to the Tegra194 CPUFREQ driver.
> > They are applicable to all the Tegra SoC's supported by the driver.
> > 
> > 1) Patch 1: Avoid making SMP call on every frequency request to reduce
> >     the time for frequency set and get calls.
> > 
> > 2) Patch 2: Use reference clock count based loop instead of udelay()
> >     to improve the accuracy of re-generated CPU frequency.
> > 
> > The patches are not related but have minor conflict. So, need to be
> > applied in order of patch numbers. If 'Patch 2' is to be applied first
> > then will rebase that and send separately.
> > 
> > ---
> > v1[2] -> v3:
> > - Patch 1: used sizeof(*data->cpu_data) in devm_kcalloc().
> > 
> > v1[1] -> v2:
> > - Patch 1: added new patch.
> > - Patch 2: changed subject and patch order.
> > 
> > Sumit Gupta (2):
> >    cpufreq: tegra194: save CPU data to avoid repeated SMP calls
> >    cpufreq: tegra194: use refclk delta based loop instead of udelay
> > 
> >   drivers/cpufreq/tegra194-cpufreq.c | 151 ++++++++++++++++++++---------
> >   1 file changed, 106 insertions(+), 45 deletions(-)
> > 
> > [2] https://lore.kernel.org/lkml/20230901164113.29139-1-sumitg@nvidia.com/
> > [1] https://lore.kernel.org/lkml/20230901152046.25662-1-sumitg@nvidia.com/
> > 
> 
> Hi Viresh,
> 
> If there is no further comment.
> Can we please still apply these patches for 6.7 ?

Applied. Thanks.

FWIW, you should have rebased the other commit (which removes cpu
online mask) over this one. I had to fix the commit manually now.
Sumit Gupta Oct. 10, 2023, 5:43 a.m. UTC | #3
On 10/10/23 11:07, Viresh Kumar wrote:
> External email: Use caution opening links or attachments
> 
> 
> On 09-10-23, 17:06, Sumit Gupta wrote:
>>
>>
>> On 04/10/23 19:35, Sumit Gupta wrote:
>>> This patch set adds below improvements to the Tegra194 CPUFREQ driver.
>>> They are applicable to all the Tegra SoC's supported by the driver.
>>>
>>> 1) Patch 1: Avoid making SMP call on every frequency request to reduce
>>>      the time for frequency set and get calls.
>>>
>>> 2) Patch 2: Use reference clock count based loop instead of udelay()
>>>      to improve the accuracy of re-generated CPU frequency.
>>>
>>> The patches are not related but have minor conflict. So, need to be
>>> applied in order of patch numbers. If 'Patch 2' is to be applied first
>>> then will rebase that and send separately.
>>>
>>> ---
>>> v1[2] -> v3:
>>> - Patch 1: used sizeof(*data->cpu_data) in devm_kcalloc().
>>>
>>> v1[1] -> v2:
>>> - Patch 1: added new patch.
>>> - Patch 2: changed subject and patch order.
>>>
>>> Sumit Gupta (2):
>>>     cpufreq: tegra194: save CPU data to avoid repeated SMP calls
>>>     cpufreq: tegra194: use refclk delta based loop instead of udelay
>>>
>>>    drivers/cpufreq/tegra194-cpufreq.c | 151 ++++++++++++++++++++---------
>>>    1 file changed, 106 insertions(+), 45 deletions(-)
>>>
>>> [2] https://lore.kernel.org/lkml/20230901164113.29139-1-sumitg@nvidia.com/
>>> [1] https://lore.kernel.org/lkml/20230901152046.25662-1-sumitg@nvidia.com/
>>>
>>
>> Hi Viresh,
>>
>> If there is no further comment.
>> Can we please still apply these patches for 6.7 ?
> 
> Applied. Thanks.
> 
> FWIW, you should have rebased the other commit (which removes cpu
> online mask) over this one. I had to fix the commit manually now.
> 
> --
> viresh

Sorry, my bad.
Thank you for your help.

Best Regards,
Sumit Gupta