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

Sumit Gupta posted 2 patches 2 years, 2 months ago
drivers/cpufreq/tegra194-cpufreq.c | 151 ++++++++++++++++++++---------
1 file changed, 106 insertions(+), 45 deletions(-)
[Patch v3 0/2] Improvements to the Tegra CPUFREQ driver
Posted by Sumit Gupta 2 years, 2 months ago
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/ 

-- 
2.17.1
Re: [Patch v3 0/2] Improvements to the Tegra CPUFREQ driver
Posted by Sumit Gupta 2 years, 2 months ago

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
Re: [Patch v3 0/2] Improvements to the Tegra CPUFREQ driver
Posted by Viresh Kumar 2 years, 2 months ago
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
Re: [Patch v3 0/2] Improvements to the Tegra CPUFREQ driver
Posted by Sumit Gupta 2 years, 2 months ago

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