mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Anthony Ruhier <aruhier@mailbox.org>
To: Pragnesh Papaniya <pragnesh.papaniya@oss.qualcomm.com>
Cc: Sudeep Holla <sudeep.holla@kernel.org>,
	 Cristian Marussi <cristian.marussi@arm.com>,
	Rob Herring <robh@kernel.org>,
	 Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	 Sibi Sankar <sibi.sankar@oss.qualcomm.com>,
	MyungJoo Ham <myungjoo.ham@samsung.com>,
	 Kyungmin Park <kyungmin.park@samsung.com>,
	Chanwoo Choi <cw00.choi@samsung.com>,
	 Dmitry Osipenko <digetx@gmail.com>,
	Thierry Reding <thierry.reding@kernel.org>,
	 Jonathan Hunter <jonathanh@nvidia.com>,
	Bjorn Andersson <andersson@kernel.org>,
	 Konrad Dybcio <konradybcio@kernel.org>,
	Rajendra Nayak <rajendra.nayak@oss.qualcomm.com>,
	 Pankaj Patil <pankaj.patil@oss.qualcomm.com>,
	linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	 arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	devicetree@vger.kernel.org,  linux-pm@vger.kernel.org,
	linux-tegra@vger.kernel.org,
	 Amir Vajid <amir.vajid@oss.qualcomm.com>,
	 Ramakrishna Gottimukkula
	<ramakrishna.gottimukkula@oss.qualcomm.com>
Subject: Re: [PATCH RFC 07/10] PM / devfreq: Introduce the QCOM SCMI Memlat devfreq driver
Date: Wed, 4 Nov 2026 22:55:35 +0100	[thread overview]
Message-ID: <auukrIsbbd3q-qh-@tour-anthony.aruhier.fr> (raw)
In-Reply-To: <20260724-rfc_v8_scmi_memlat-v1-7-cb732bcff1f4@oss.qualcomm.com>

Hi,

On Fri, Jul 24, 2026 at 12:48:12PM +0530, Pragnesh Papaniya wrote:
> From: Sibi Sankar <sibi.sankar@oss.qualcomm.com>
> +	for (i = 0; i < info->memory_cnt; i++) {
> +		struct scmi_qcom_memory_info *memory = info->memory[i];
> +		const struct scmi_qcom_memory_range *range = &memory->cfg->memory_range;
> +		struct devfreq_dev_profile *profile = &memory->profile;
> +
> +		/*
> +		 * CPUCP re-evaluates and re-votes at most once per cpucp_sample_ms,
> +		 * so a new operating point can appear only that often. Polling at half
> +		 * that period guarantees each distinct vote is observed in trans_stat
> +		 * before it can change again.
> +		 */
> +		profile->polling_ms = max(1U, info->cfg_data->cpucp_sample_ms / 2);
> +		profile->get_cur_freq = scmi_qcom_devfreq_get_cur_freq;
> +		profile->initial_freq = range->max_freq_khz > 1 ?
> +					(unsigned long)((u64)range->min_freq_khz * HZ_PER_KHZ) :
> +					range->min_freq_khz;
> +
> +		faux_device_set_drvdata(memory->fdev, memory);
> +
> +		memory->devfreq = devfreq_add_device(&memory->fdev->dev, profile,
> +						     DEVFREQ_GOV_REMOTE, NULL);
> +		if (IS_ERR(memory->devfreq)) {
> +			ret = PTR_ERR(memory->devfreq);
> +			memory->devfreq = NULL;
> +			ops->stop_activity(ph, NULL, 0, MEMLAT_ALGO_STR, MEMLAT_STOP_TIMER);
> +			return dev_err_probe(&sdev->dev, ret, "failed to add devfreq device\n");
> +		}
> +	}

I tried it on Hamoa (Yoga Slim 7x, x1e80100), loaded scmi_qcom_memlat_devfreq,
and I see the apss_cpucp_mbox IRQ firing 3100 times per second. It raised the
power consumption while idle, screen off, from 0.9W to 1.4W.

The polling seems to be the issue, as I didn't see hectic changes of frequency.
Raising the polling from 2ms (default) to 20ms makes the power usage goes back
to around 0.95W, with ~150 interrupts/s from apss_cpucp_mbox. It's still higher
than with memlat off, but it seems to be a better trade-off for now.

Can you check on similar platforms (hamoa, glymor) if you see the same issue?

Thanks,
--
Anthony Ruhier

  reply	other threads:[~2026-11-04 21:55 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-24  7:18 [PATCH RFC 00/10] firmware: arm_scmi: vendors: Qualcomm Generic Vendor Extensions Pragnesh Papaniya
2026-07-24  7:18 ` [PATCH RFC 01/10] firmware: arm_scmi: Add SCMI QCOM Generic Extension Protocol documentation Pragnesh Papaniya
2026-07-24  9:13   ` Sudeep Holla
2026-08-03 20:37     ` Sibi Sankar
2026-08-13  7:18       ` Sudeep Holla
2026-08-19 19:56         ` Sibi Sankar
2026-09-08 19:37           ` Sudeep Holla
2026-07-24  7:18 ` [PATCH RFC 02/10] dt-bindings: firmware: arm,scmi: Add Qualcomm Generic Extension Protocol Pragnesh Papaniya
2026-07-24  7:18 ` [PATCH RFC 03/10] firmware: arm_scmi: vendors: Add QCOM SCMI Generic Extensions Pragnesh Papaniya
2026-07-24  7:18 ` [PATCH RFC 04/10] PM / devfreq: Add new target_freq attribute flag for governors Pragnesh Papaniya
2026-07-24  7:18 ` [PATCH RFC 05/10] PM / devfreq: Add new track_remote " Pragnesh Papaniya
2026-07-24  7:18 ` [PATCH RFC 06/10] PM / devfreq: Add a governor for tracking remote device frequencies Pragnesh Papaniya
2026-07-24  7:18 ` [PATCH RFC 07/10] PM / devfreq: Introduce the QCOM SCMI Memlat devfreq driver Pragnesh Papaniya
2026-11-04 21:55   ` Anthony Ruhier [this message]
2026-07-24  7:18 ` [PATCH RFC 08/10] arm64: dts: qcom: glymur: Enable LLCC/DDR/DDR_QOS DVFS Pragnesh Papaniya
2026-07-24  7:18 ` [PATCH RFC 09/10] arm64: dts: qcom: hamoa: " Pragnesh Papaniya
2026-07-24  7:18 ` [PATCH RFC 10/10] arm64: dts: qcom: kaanapali: " Pragnesh Papaniya
2026-07-24  8:40 ` [PATCH RFC 00/10] firmware: arm_scmi: vendors: Qualcomm Generic Vendor Extensions Sudeep Holla
2026-07-24  9:02   ` Pragnesh Papaniya
2026-10-18 15:54 ` [PATCH RFC 0/10] " Ramón Jesús Miranda

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=auukrIsbbd3q-qh-@tour-anthony.aruhier.fr \
    --to=aruhier@mailbox.org \
    --cc=amir.vajid@oss.qualcomm.com \
    --cc=andersson@kernel.org \
    --cc=arm-scmi@vger.kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=cristian.marussi@arm.com \
    --cc=cw00.choi@samsung.com \
    --cc=devicetree@vger.kernel.org \
    --cc=digetx@gmail.com \
    --cc=jonathanh@nvidia.com \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    --cc=pankaj.patil@oss.qualcomm.com \
    --cc=pragnesh.papaniya@oss.qualcomm.com \
    --cc=rajendra.nayak@oss.qualcomm.com \
    --cc=ramakrishna.gottimukkula@oss.qualcomm.com \
    --cc=robh@kernel.org \
    --cc=sibi.sankar@oss.qualcomm.com \
    --cc=sudeep.holla@kernel.org \
    --cc=thierry.reding@kernel.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

all inboxes | Powered by JetHome®