From: Steev Klimaszewski <steev@kali.org>
To: Thara Gopinath <thara.gopinath@linaro.org>,
agross@kernel.org, bjorn.andersson@linaro.org,
rui.zhang@intel.com, daniel.lezcano@linaro.org,
viresh.kumar@linaro.org, rjw@rjwysocki.net, robh+dt@kernel.org
Cc: tdas@codeaurora.org, mka@chromium.org,
linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [Patch v3 0/6] Introduce LMh driver for Qualcomm SoCs
Date: Tue, 27 Jul 2021 12:43:49 -0500 [thread overview]
Message-ID: <ff6fc8d4-38e9-86ea-f689-609668c53196@kali.org> (raw)
In-Reply-To: <adfe4d6d-7433-23f2-bc57-d6fba2d8725b@linaro.org>
On 7/27/21 10:29 AM, Thara Gopinath wrote:
>
>
> On 7/21/21 11:14 PM, Steev Klimaszewski wrote:
>> Hi Thara!
>>
>> On 7/8/21 7:06 AM, Thara Gopinath wrote:
>>> Limits Management Hardware(LMh) is a hardware infrastructure on some
>>> Qualcomm SoCs that can enforce temperature and current limits as
>>> programmed
>>> by software for certain IPs like CPU. On many newer SoCs LMh is
>>> configured
>>> by firmware/TZ and no programming is needed from the kernel side.
>>> But on
>>> certain SoCs like sdm845 the firmware does not do a complete
>>> programming of
>>> the h/w block. On such SoCs kernel software has to explicitly set up
>>> the
>>> temperature limits and turn on various monitoring and enforcing
>>> algorithms
>>> on the hardware.
>>>
>>> Introduce support for enabling and programming various limit
>>> settings and
>>> monitoring capabilities of Limits Management Hardware(LMh)
>>> associated with
>>> cpu clusters. Also introduce support in cpufreq hardware driver to
>>> monitor
>>> the interrupt associated with cpu frequency throttling so that this
>>> information can be conveyed to the schdeuler via thermal pressure
>>> interface.
>>>
>>> With this patch series following cpu performance improvement(30-70%) is
>>> observed on sdm845. The reasoning here is that without LMh being
>>> programmed
>>> properly from the kernel, the default settings were enabling thermal
>>> mitigation for CPUs at too low a temperature (around 70-75 degree
>>> C). This
>>> in turn meant that many a time CPUs were never actually allowed to
>>> hit the
>>> maximum possible/required frequencies.
>>>
>>> UnixBench whets and dhry (./Run whets dhry)
>>> System Benchmarks Index Score
>>>
>>> Without LMh Support With LMh Support
>>> 1 copy test 1353.7 1773.2
>>>
>>> 8 copy tests 4473.6 7402.3
>>>
>>> Sysbench cpu
>>> sysbench cpu --threads=8 --time=60 --cpu-max-prime=100000 run
>>>
>>> Without LMh Support With LMh Support
>>> Events per
>>> second 355 614
>>>
>>> Avg Latency(ms) 21.84 13.02
>>>
>>> v2->v3:
>>> - Included patch adding dt binding documentation for LMh nodes.
>>> - Rebased to v5.13
>>>
>>> Thara Gopinath (6):
>>> firmware: qcom_scm: Introduce SCM calls to access LMh
>>> thermal: qcom: Add support for LMh driver
>>> cpufreq: qcom-cpufreq-hw: Add dcvs interrupt support
>>> arm64: boot: dts: qcom: sdm45: Add support for LMh node
>>> arm64: boot: dts: qcom: sdm845: Remove cpufreq cooling devices
>>> for CPU
>>> thermal zones
>>> dt-bindings: thermal: Add dt binding for QCOM LMh
>>>
>>> .../devicetree/bindings/thermal/qcom-lmh.yaml | 100 ++++++++
>>> arch/arm64/boot/dts/qcom/sdm845.dtsi | 162 ++----------
>>> drivers/cpufreq/qcom-cpufreq-hw.c | 118 +++++++++
>>> drivers/firmware/qcom_scm.c | 58 +++++
>>> drivers/firmware/qcom_scm.h | 4 +
>>> drivers/thermal/qcom/Kconfig | 10 +
>>> drivers/thermal/qcom/Makefile | 1 +
>>> drivers/thermal/qcom/lmh.c | 239
>>> ++++++++++++++++++
>>> include/linux/qcom_scm.h | 14 +
>>> 9 files changed, 570 insertions(+), 136 deletions(-)
>>> create mode 100644
>>> Documentation/devicetree/bindings/thermal/qcom-lmh.yaml
>>> create mode 100644 drivers/thermal/qcom/lmh.c
>>>
>> I've been using these patches on a 5.13 kernel
>> (https://github.com/steev/linux/tree/linux-5.13.y - while trying to
>> track down a different issue, while playing a video on youtube, as well
>> as compressing a 9.2GB file with xz, I got the following
>
> Hi Steev,
>
> Thanks for testing this. I was unable to reproduce this. I have posted
> v4 moving the interrupt handling in qcom-cpufreq-hw to threaded
> interrupt handler and hopefully this should fix the issue. It will be
> great if you can test and let me know.
>
Hi Thara,
I've been testing v4 for a little bit here, and so far I can't seem to
get it to reproduce anymore. I will keep trying but fingers crossed
that that did the trick.
For setup, I'm using https://github.com/steev/linux/tree/linux-5.13.y
with the "distro_defconfig" configuration here on my c630s. I'm also
running https://github.com/steev/scheduler as a systemd service. So far
I've been able to sleep/suspend without issue while running "make
-j$(nproc) deb-pkg" in those kernel sources as well as `xz
--memlimit-compress=50 -T 4 imagefile.img" on a 9.2GB file at the same
time. One system is running the Budgie desktop on top of Xorg, and the
other is running Gnome 3.38 on top of Wayland.
-- steev
prev parent reply other threads:[~2021-07-27 17:44 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-08 12:06 [Patch v3 0/6] Introduce LMh driver for Qualcomm SoCs Thara Gopinath
2021-07-08 12:06 ` [Patch v3 1/6] firmware: qcom_scm: Introduce SCM calls to access LMh Thara Gopinath
2021-07-10 4:02 ` Bjorn Andersson
2021-07-08 12:06 ` [Patch v3 2/6] thermal: qcom: Add support for LMh driver Thara Gopinath
2021-07-10 4:15 ` Bjorn Andersson
2021-07-13 0:49 ` Thara Gopinath
2021-07-08 12:06 ` [Patch v3 3/6] cpufreq: qcom-cpufreq-hw: Add dcvs interrupt support Thara Gopinath
2021-07-08 20:00 ` kernel test robot
2021-07-09 6:46 ` Viresh Kumar
2021-07-09 15:37 ` Thara Gopinath
2021-07-12 4:35 ` Viresh Kumar
2021-07-12 4:41 ` Viresh Kumar
2021-07-13 1:18 ` Thara Gopinath
2021-07-13 3:18 ` Viresh Kumar
2021-07-14 12:37 ` Thara Gopinath
2021-07-10 4:57 ` Bjorn Andersson
2021-07-13 1:09 ` Thara Gopinath
2021-07-08 12:06 ` [Patch v3 4/6] arm64: boot: dts: qcom: sdm45: Add support for LMh node Thara Gopinath
2021-07-10 4:17 ` Bjorn Andersson
2021-07-19 16:33 ` Bjorn Andersson
2021-07-19 22:44 ` Thara Gopinath
2021-07-08 12:06 ` [Patch v3 5/6] arm64: boot: dts: qcom: sdm845: Remove cpufreq cooling devices for CPU thermal zones Thara Gopinath
2021-07-10 4:17 ` Bjorn Andersson
2021-07-08 12:06 ` [Patch v3 6/6] dt-bindings: thermal: Add dt binding for QCOM LMh Thara Gopinath
2021-07-10 4:21 ` Bjorn Andersson
2021-07-13 0:54 ` Thara Gopinath
2021-07-12 17:32 ` Rob Herring
2021-07-22 3:14 ` [Patch v3 0/6] Introduce LMh driver for Qualcomm SoCs Steev Klimaszewski
2021-07-27 15:29 ` Thara Gopinath
2021-07-27 17:43 ` Steev Klimaszewski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ff6fc8d4-38e9-86ea-f689-609668c53196@kali.org \
--to=steev@kali.org \
--cc=agross@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=daniel.lezcano@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mka@chromium.org \
--cc=rjw@rjwysocki.net \
--cc=robh+dt@kernel.org \
--cc=rui.zhang@intel.com \
--cc=tdas@codeaurora.org \
--cc=thara.gopinath@linaro.org \
--cc=viresh.kumar@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).