From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2A5EC32ED32 for ; Fri, 19 Jun 2026 12:31:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781872301; cv=none; b=WQuMZ7Vf1AwhIQhR7xrF6tKcoHM9SJ4eHBzDYUtfNqrefR7/A3vTU2f+IDpfz5h1u5/pbLEL9DrsGNW4KqzTz1DbrzC/ES9+vO3RIfdW4p8bIti4jIvgxsji3UHgcMelB5CTBHp17kjhBUNBnGcEIzE30ZvcHnVqgNyT3G7ftTU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781872301; c=relaxed/simple; bh=L6z4k3QijNHTGXXT1fty9BWxZPIxToZssOMwBPutHeI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ihBH8/OyYZ+TIOci7QcKNUbKQyD3SXJ51jnVrQsRC2/zSco2RJTcVNUsceky5PD+89qghvgnHH9sQaL8KtyyZyjYc4lntSo/DO00jowVUQTdVh1lntP6qbrxfFyPIhDOo+rjBmRBscsjM1DroDaMs6Y4au1XoLczYwjgWiLV9Aw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=Pz/g6FMa; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=WZlcALdk; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="Pz/g6FMa"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="WZlcALdk" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65J7QALI4185079 for ; Fri, 19 Jun 2026 12:31:39 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= TFcrLoU+u+djEDf0Ql04tP5oMolAVqMa7ZABzijFO+s=; b=Pz/g6FMaYoQlQk8+ 3WjzmjdxjC4j44ms7bfVLBwq0rZdzNZoXBxTKXWdnGgXegvrabKGeUMCL5gh82IS mOBo6SMiETuCVsq2tWK0CgwFkTRXj9REs7SkW13ibhHozaFEPLUHLQ9W4iUComHM rwHUK+D7z5BBZvE2Ew4dk5h9E+6DbDEuU5eOCCWHVPIoTbUqFs78i8Qhd7ImUuFz wEvJfUfSXjzJpKntcC//Z4nOzaYZW7T9t7lhTNQWluFTd03VGI2ppEPfzxCc32b3 BuSJuDbDUrDn4W5QbGWZPLorztFFBKLUydOf4M/NLcx7+OV4UGwIfA18xikEcBVa 3TSNhg== Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4evp6sb901-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 19 Jun 2026 12:31:39 +0000 (GMT) Received: by mail-pj1-f72.google.com with SMTP id 98e67ed59e1d1-37c64f7ff48so2464171a91.2 for ; Fri, 19 Jun 2026 05:31:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781872298; x=1782477098; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=TFcrLoU+u+djEDf0Ql04tP5oMolAVqMa7ZABzijFO+s=; b=WZlcALdk0uMX4UtSKid6qww1GssGiwBONzf6Z23sxsNwn4Bx3C4BP8HNiU9XKaij6T IrKynLmRbAGXz0UdPEyPvqY2YQN2HWeKXBDt1SNjI4yv6Y0Ef25fBNTzD6i/A5+68hXA GZcxggzzDogJqrrdESFNpqpxXVwtxnJHVrNwRdFfl4XMNUTLwef0IDSTXjVHk5FhWYVm 3mUnhd9G6k2rCX03BgDeUa6bOntg1WBrvPa4LHuNwq4TeOTxXQLq3bhEgmr3pFl4lrzH MvK0d1VrA4J+FKdqWCIAvPaGsybArJ71C7VU0x7icDJ8YQlW5gSTkFsa7CB4p6w8+tE9 9OqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781872298; x=1782477098; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=TFcrLoU+u+djEDf0Ql04tP5oMolAVqMa7ZABzijFO+s=; b=NWp3bmUQc9cCq0MiGoQtTRoWJUAQ7WwNihkOL7oxotoR0uPvNy4jL4O3kK6/r1+GlE ene4tko5Ycatv40OwZpV2RXdvHg+mxy+vjQXhXoPyBCZeH4PWWY+vYA/H5PFiYXVvK9y 1SQojNUyRIoY1jNfUvlAjzHwUTPw1gacUW/12i7Kkt+cQzWhHV+E4I65Hf52Vdcpvh9y Q/xVtFGPBYrHNvqRS0j3UrM/udAhZUhQ77/V8PBnYlEbKc2CHxm0AAZBTLIZ2uJT/8o+ Ct7iOLb83MBTN1WX6kiG5KFuYLXNCVEd8GfmuVM56touEHMA6l+aitcucmdNeXDvEb8Z xGCA== X-Forwarded-Encrypted: i=1; AFNElJ9j4Gb+tWwzg9GNS6Ev3e13G7F1NwlWB4kF3PKm44zKsqstY1ajGrvdwnQR/MSPEhXsX4WvD/+GO0dX/nY=@vger.kernel.org X-Gm-Message-State: AOJu0YzE7DelIGLm2SzyIOFbwV2IbPAwRxlzl1xhSSrM12NqJNjRkNxy vshR5RiC1WiNMR0Gyq4NHIkPD43BZx4XvrOuYwlmw/YXZ3XyQnL+OXUcjBI+jYsIHghnC+2NCYT pzmfugnxaVP7fSTLUadH0HuRjq0IWBrySenoofWJdnCRX6f15v7rHW60RZw/WvhmR4YY= X-Gm-Gg: AfdE7cl9wWOaUq8Qj8M04B7wjKX7erNw8jHwlBywCBN+sPxAZT98DiRcYOttYT9LGiF 7SWRxnHktIaJCkyVSPwIxfhH0/etRDlaN8e3oyVRWeUPo7KH0UWFdTZauszLZDwSFkIFn/QRm4i oWDPgYnqWkK7AxB+ScFD/RLEr5KcrGdaWkmBoH2/xcE4eVPbgJSVP5Y3oagAvdyHhjnIgD0Nilg +vl/0LJtCTpKS27tNM7cU0Q9peTtfiCW6+Thb3eqE9Qy/HxaxlIEDNuZ2jiucKPyozA/y8JSpaD Wxk9leMxVHZx1ep42tRQZ3x6JdlBj72WfwuT0CICuf5yOOnB3xAMHwaQw+bD00bkpnc85cmRYjY iEldzf0/rYzl3n02JFm4CONB7hkphLDLfVeeZYaj8H+0JEmGryO1JKFI0VAETDLTeDCK3oeAH4+ Je5QTpos57lAAqJ02FUxvHkdDDbQjKm2H24w== X-Received: by 2002:a17:90b:17c5:b0:369:de03:29c8 with SMTP id 98e67ed59e1d1-37d1ea3ad49mr2456626a91.23.1781872298052; Fri, 19 Jun 2026 05:31:38 -0700 (PDT) X-Received: by 2002:a17:90b:17c5:b0:369:de03:29c8 with SMTP id 98e67ed59e1d1-37d1ea3ad49mr2456595a91.23.1781872297615; Fri, 19 Jun 2026 05:31:37 -0700 (PDT) Received: from [10.50.22.170] (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com. [103.229.18.19]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-c8a8525f818sm2378163a12.9.2026.06.19.05.31.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 19 Jun 2026 05:31:36 -0700 (PDT) Message-ID: <8725caf9-cebb-49ce-b2c8-4960a6073322@oss.qualcomm.com> Date: Fri, 19 Jun 2026 18:01:23 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH RFC v7 0/9] firmware: arm_scmi: vendors: Qualcomm Generic Vendor Extensions To: Sudeep Holla Cc: Cristian Marussi , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Sibi Sankar , MyungJoo Ham , Kyungmin Park , Chanwoo Choi , Dmitry Osipenko , Thierry Reding , Jonathan Hunter , Bjorn Andersson , Konrad Dybcio , Rajendra Nayak , Pankaj Patil , 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 , Ramakrishna Gottimukkula References: <20260610-rfc_v7_scmi_memlat-v7-0-f3f68c608f25@oss.qualcomm.com> <20260616-responsible-junglefowl-of-chaos-7eda7d@sudeepholla> Content-Language: en-US From: Pragnesh Papaniya In-Reply-To: <20260616-responsible-junglefowl-of-chaos-7eda7d@sudeepholla> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-GUID: qsUhkOHNzvyTSeJYA1lracxZTqk0q1PP X-Proofpoint-ORIG-GUID: qsUhkOHNzvyTSeJYA1lracxZTqk0q1PP X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE5MDExNyBTYWx0ZWRfX9Fbf42Cbyix8 SEsVzP057Pb+g7rVk7LGufA1oGt04WCV4Hxy3xKTpFp3Bu50DaGBPOA6XthSmKOifrHJB+yo3U2 CBgMDa2YsTmAOMOHl4rwDEl3SOY56BJvOWQfmP9fU1VSIblgp9eByCjEeSngDHygA5EjVQtCalH Sb5RdvSONb76edrV9KUv7PWX8YMlov/WKzmvOdN39QP84Jj3hGWdTjGoJJf2B7mitpKDOlyR9sH b2MrB8ERZkclWL1AKanueIy23Zi+Hg5Up9q2ScDyWsDajSL1B7E/DYvnTOH9c7Kw5QMbDzxSxVd 1z1XK/XmoyXmvW31d2yvZjwGxWSqlD7yzfQlX7HgbE7Rc3nxPR9LYkYw0Z1qDCBj9KCqI63ynol +lZxIimuPfzf9TuMNvY21YIKAQ5Sh3XR/NBGtIjAtk/IakkC9W74kxf8ylVihVUeMCnL59ulKJJ ElioNbm7QyHn9yZfLzw== X-Authority-Analysis: v=2.4 cv=H6LrBeYi c=1 sm=1 tr=0 ts=6a3536ab cx=c_pps a=RP+M6JBNLl+fLTcSJhASfg==:117 a=Ou0eQOY4+eZoSc0qltEV5Q==:17 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=_HCkHYxhaP3GdHjqj7kA:9 a=QEXdDO2ut3YA:10 a=iS9zxrgQBfv6-_F4QbHw:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE5MDExNyBTYWx0ZWRfX/9YW+ch31n33 /s3y56vL2ULLuW25bIP9TOeRnP15QsIirtSpzJtuqLEjv1izgE9S9mFr+YT6Dr5yWF4LT24G/TV 9foqlI83INj4W8m8MLSby/KMEtcLfSo= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-19_02,2026-06-18_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 priorityscore=1501 phishscore=0 lowpriorityscore=0 impostorscore=0 spamscore=0 suspectscore=0 malwarescore=0 clxscore=1015 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2606190117 On 16-Jun-26 1:57 PM, Sudeep Holla wrote: > On Wed, Jun 10, 2026 at 02:21:27PM +0530, Pragnesh Papaniya wrote: >> The QCOM SCMI vendor protocol provides a generic way of exposing a number of >> Qualcomm SoC specific features (like memory bus scaling) through a mixture of >> pre-determined algorithm strings and param_id pairs hosted on the SCMI >> controller. On Qualcomm Glymur and Hamoa SoCs, the memlat governor and the >> mechanism to control the various caches and RAM is hosted on the CPU Control >> Processor (CPUCP) and the method to tweak and start the governor is exposed >> through the QCOM SCMI Generic Extension Protocol. >> >> This series introduces the devfreq SCMI client driver that uses the MEMLAT >> algorithm string hosted on the QCOM SCMI Generic Extension Protocol to detect >> memory latency workloads and control frequency/level of the various memory >> buses (DDR/LLCC/DDR_QOS). DDR/LLCC/DDR_QOS are modelled as devfreq devices >> using the remote devfreq governor. This provides basic insight into device >> operation via trans_stat and lets userspace further tweak the parameters of >> the remote governor. >> >> trans_stat data for DDR/LLCC/DDR_QOS is now available with this series: >> >> From : To >> 315000000 479000000 545000000 725000000 840000000 959000000 1090000000 1211000000 time(ms) >> 315000000: 0 3 6 6 6 7 0 30 143956 >> 479000000: 2 0 7 1 1 1 0 3 356 >> 545000000: 7 6 0 5 5 0 0 10 1200 >> 725000000: 3 0 5 0 6 1 0 6 2172 >> 840000000: 8 2 3 2 0 4 0 12 1188 >> 959000000: 3 0 1 2 2 0 0 13 272 >> 1090000000: 0 0 0 0 0 0 0 0 0 >> 1211000000: 35 4 11 5 11 8 0 0 21684 >> Total transition : 253 >> >> QCOM SCMI Generic Vendor protocol background: >> A lot of the vendor protocol numbers used internally were for >> debug/internal development purposes that were either highly SoC-specific >> or had to be disabled because some features were fused out during >> production. This led to a large number of vendor protocol numbers being >> quickly consumed and never released. Using a single generic vendor >> protocol with functionality abstracted behind algorithm strings gives us >> the flexibility of letting such functionality exist during initial >> development/debugging while still being able to expose mature features >> (like MEMLAT) once they have stabilised. The param_ids are expected to >> act as ABI for algorithm strings like MEMLAT. >> > > Not sure if it was discussed in the previous versions or not, it would be > good if you can capture why some of bus scaling doesn't work with the existing > SCMI performance protocol and the monitors don't fit the MPAM mode. > > Please capture them in 1/9 as a motivation for this vendor protocol. It will > then help to understand it better as I am still struggling to. Sorry for that. Thanks for the input! SCMI perf protocol exports perf domains to kernel where kernel can set the frequency but here the scaling governor runs on the SCP while kernel just observes frequency changes made by remote governor. While MPAM is not enabled/supported on all hardware (Hamoa). Here's the pseudo-code for remote governor on CPUCP to help you understand more: Barebone Memlat Pseudocode: Every sample window, get snapshot of latest AMU counters from each CPU and scale all the memory according to the map_table: For each CPU // Calculate IPM ( Instruction retired / cache miss count (L2 cache refills for LLCC voting and CPU RD miss counter for DDR)) If (IPM < IPM_CEIL) Use CPU cycle counter to determine CPU frequency in the past N milliseconds LLCC_freq = lookup_llcc_freq(cpu_freq_max) DDR_freq = lookup_ddr_freq(cpu_freq_max) DDR_QOS_freq = lookup_ddr_qos_freq(cpu_freq_max) // Scale all memories Scale_freq(Memory); // LLCC/DDR/DDR_QOS >