lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <94a329fe-52d2-eb8d-9c6f-c1bdf59ffe44@nvidia.com>
Date:   Thu, 9 Nov 2023 17:06:43 +0530
From:   Sumit Gupta <sumitg@...dia.com>
To:     Hanjun Guo <guohanjun@...wei.com>,
        "Rafael J. Wysocki" <rafael@...nel.org>, <lpieralisi@...nel.org>,
        <sudeep.holla@....com>
CC:     <rui.zhang@...el.com>, <lenb@...nel.org>,
        <linux-acpi@...r.kernel.org>, <linux-tegra@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <treding@...dia.com>,
        <jonathanh@...dia.com>, <bbasu@...dia.com>, <sanjayc@...dia.com>,
        <ksitaraman@...dia.com>, <srikars@...dia.com>,
        <jbrasen@...dia.com>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        "Sumit Gupta" <sumitg@...dia.com>
Subject: Re: [Patch v5 2/2] ACPI: processor: reduce CPUFREQ thermal reduction
 pctg for Tegra241



On 09/11/23 13:20, Hanjun Guo wrote:
> External email: Use caution opening links or attachments
> 
> 
> On 2023/10/20 16:30, Sumit Gupta wrote:
>>
>>>> Current implementation of processor_thermal performs software 
>>>> throttling
>>>> in fixed steps of "20%" which can be too coarse for some platforms.
>>>> We observed some performance gain after reducing the throttle
>>>> percentage.
>>>> Change the CPUFREQ thermal reduction percentage and maximum thermal
>>>> steps
>>>> to be configurable. Also, update the default values of both for Nvidia
>>>> Tegra241 (Grace) SoC. The thermal reduction percentage is reduced to
>>>> "5%"
>>>> and accordingly the maximum number of thermal steps are increased as
>>>> they
>>>> are derived from the reduction percentage.
>>>>
>>>> Signed-off-by: Srikar Srimath Tirumala <srikars@...dia.com>
>>>> Co-developed-by: Sumit Gupta <sumitg@...dia.com>
>>>> Signed-off-by: Sumit Gupta <sumitg@...dia.com>
>>>> ---
>>>>   drivers/acpi/arm64/Makefile          |  1 +
>>>>   drivers/acpi/arm64/thermal_cpufreq.c | 20 ++++++++++++++++
>>>>   drivers/acpi/processor_thermal.c     | 35 
>>>> +++++++++++++++++++++++++---
>>>>   include/linux/acpi.h                 |  9 +++++++
>>>>   4 files changed, 62 insertions(+), 3 deletions(-)
>>>>   create mode 100644 drivers/acpi/arm64/thermal_cpufreq.c
>>>>
>>>> diff --git a/drivers/acpi/arm64/Makefile b/drivers/acpi/arm64/Makefile
>>>> index 143debc1ba4a..3f181d8156cc 100644
>>>> --- a/drivers/acpi/arm64/Makefile
>>>> +++ b/drivers/acpi/arm64/Makefile
>>>> @@ -5,3 +5,4 @@ obj-$(CONFIG_ACPI_GTDT)         += gtdt.o
>>>>   obj-$(CONFIG_ACPI_APMT)        += apmt.o
>>>>   obj-$(CONFIG_ARM_AMBA)         += amba.o
>>>>   obj-y                          += dma.o init.o
>>>> +obj-$(CONFIG_ACPI)             += thermal_cpufreq.o
>>>> diff --git a/drivers/acpi/arm64/thermal_cpufreq.c
>>>> b/drivers/acpi/arm64/thermal_cpufreq.c
>>>> new file mode 100644
>>>> index 000000000000..de834fb013e7
>>>> --- /dev/null
>>>> +++ b/drivers/acpi/arm64/thermal_cpufreq.c
>>>> @@ -0,0 +1,20 @@
>>>> +// SPDX-License-Identifier: GPL-2.0-only
>>>> +#include <linux/acpi.h>
>>>> +
>>>> +#ifdef CONFIG_HAVE_ARM_SMCCC_DISCOVERY
>>>> +#define SMCCC_SOC_ID_T241      0x036b0241
>>>> +
>>>> +int acpi_thermal_cpufreq_pctg(void)
>>>> +{
>>>> +       s32 soc_id = arm_smccc_get_soc_id_version();
>>>> +
>>>> +       /*
>>>> +        * Check JEP106 code for NVIDIA Tegra241 chip (036b:0241) and
>>>> +        * reduce the CPUFREQ Thermal reduction percentage to 5%.
>>>> +        */
>>>> +       if (soc_id == SMCCC_SOC_ID_T241)
>>>> +               return 5;
>>>> +
>>>> +       return 0;
>>>> +}
>>>> +#endif
>>>
>>> This part needs an ACK from the ARM folks.
>>>
>> Sorry, missed adding 'ACPI arm64' maintainers. Added Lorenzo, Sudeep and
>> Hanjun.
> 
> Sorry for the late reply, would mind giving me the link which the ID
> (SMCCC_SOC_ID_T241) is documented?
> 
> Thanks
> Hanjun

The ID is already used in file 'irq-gic-v3.c'. Please refer change [1].

[1] 
https://lore.kernel.org/linux-arm-kernel/20230319024314.3540573-2-sdonthineni@nvidia.com/

Best Regards,
Sumit Gupta

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ