Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp510392rdb; Thu, 15 Feb 2024 07:02:31 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUmjbnwgHAr/NpS6DLbUODwbMNxN4enqkyDg5l6Bd2djCP0EP/Zwv/XpOCYv+uHwa3v3zhErAer2ftkQ0Dlipu69DsZmzSw2x3S9hSASw== X-Google-Smtp-Source: AGHT+IHnjVknJCj5QduAFoR67/VH0Xe8wH6M9Vwmo3m6DfQCpooJc+oIqUdwlPT3lCtRkLEDll58 X-Received: by 2002:a05:6a20:439f:b0:19e:aa03:19b0 with SMTP id i31-20020a056a20439f00b0019eaa0319b0mr2822409pzl.0.1708009350463; Thu, 15 Feb 2024 07:02:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708009350; cv=pass; d=google.com; s=arc-20160816; b=aUIJYIhSB0002CWt9JnaeDjVm/cdBoxjffbzvJ5DiwYHsIk/T4UXzB3RjncSYWqU70 IYTttE2alUf0ElHSwK5MACtVB7ndoAwK/VA4uZntBBmiazkFkPe1GZMKdupEsxOBLTUz r4efE3x+j0RyDEKf4pkZic/+H0l9IvM9lPtQqEKq2YkNMykgTMebfxXhikDkg9e2dHmt vcBVztlyzgvzf5VgiRfFBLOjD1HvkCiAMqnNfDTzLJzVNkSuLa5w94nllxAxZHmPU8K0 wWF9vGlgexNkI9EGmjInr2s0GwR5iQXVqgxi2kNQvqoAw4pII2pvM2FK2U1UnWiMLI0g LmUQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=owsChjU/SBhnaF7br9SAGXyQ782wXhGbE1sAxfY99/Q=; fh=Qd9/vt3OUME6DsJvWljzLSIhVSe+lHmOfvvBjeDRPjU=; b=WnhPjB9c1Z5lD7FDxfnVFoNIBWGMIE1a2CV3NSpP9oSuRPxmy29W96RbIgnwT25G2O BU4OsaLVY6REIplSycQdZSvTpSAa6JfrcS7wSkF6Uu8aBj7loH5J1Z7Jp73TsUR/bZi9 gE9HMD4dy6LSOUoVSI4niMAnpQ5Zqw3YIqilF0QQmXUk3W8VlObXNweytUBSPXK9Us6X n0Df9JEFCuGv6IQ0i/mLBI0JIjjbMVu9FOn6FmmoDVGKWsgnRRLlQEhdBBIEwDHbwGax aNT/xDKpqNFd45vai8F88O/FNOR0k5UpDD9P+O3NUt8B0r2WMQzzNcLRtyax1IYXTjJI iJeg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-67128-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67128-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id b2-20020a633402000000b005dc4f9cececsi1255123pga.623.2024.02.15.07.02.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 07:02:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67128-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-67128-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67128-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 41F6A28B8B8 for ; Thu, 15 Feb 2024 15:00:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A6E65133288; Thu, 15 Feb 2024 14:57:47 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 520DD13173F; Thu, 15 Feb 2024 14:57:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708009067; cv=none; b=fFWy5pJqhtCu9Tr6wbTbLDOYrgm2Ot1yZrnBBe78lGwZkFAXFx6SFGda43bk5lvac+S9ijN/61YDI9sUMT2Q5giPU/kL2klReUglXUnICKs5UtPAJ//IoQBD2lSIbEKzY+tkx/wmYuxndR3M2QivBduAAhs0K5woRNbqD4OxMdU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708009067; c=relaxed/simple; bh=1Gv7+LBoNQLxJ3O3mSHbpiF5DyNS3KBkgKz/fRO/mSE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Nb1pr7DjZzlrjCTJrS8ehvHrq4z+L2S7NLwcAqs8TwpDlWv9Hdld+7cXtbM+t1PQj841Ksq7Z7rI8zCWNlF3Kv4xLGLxoEJMi38DI2OPYsArsw2gvf05/z6qOamAfRPvUwxPqzyC4cccvdNaDRMwXpqZ3BkABOZT++3E32pgNik= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B24851FB; Thu, 15 Feb 2024 06:58:18 -0800 (PST) Received: from [192.168.178.6] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B27B13F7A6; Thu, 15 Feb 2024 06:57:35 -0800 (PST) Message-ID: <265e5f2c-9b45-420f-89b1-44369aeb8418@arm.com> Date: Thu, 15 Feb 2024 15:57:34 +0100 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 0/3] cpufreq: scmi: Add boost frequency support Content-Language: en-US To: Sibi Sankar , Sudeep Holla , Viresh Kumar Cc: cristian.marussi@arm.com, rafael@kernel.org, morten.rasmussen@arm.com, lukasz.luba@arm.com, sboyd@kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, quic_mdtipton@quicinc.com, linux-arm-msm@vger.kernel.org, nm@ti.com References: <20240117110443.2060704-1-quic_sibis@quicinc.com> <20240123060827.a3vszziftj6pszt3@vireshk-i7> <01b3d0ed-3fd3-86c6-7b0f-48d34a5d9ba8@quicinc.com> From: Dietmar Eggemann In-Reply-To: <01b3d0ed-3fd3-86c6-7b0f-48d34a5d9ba8@quicinc.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 13/02/2024 08:35, Sibi Sankar wrote: > > > On 1/31/24 20:37, Dietmar Eggemann wrote: >> On 23/01/2024 11:15, Sudeep Holla wrote: >>> On Tue, Jan 23, 2024 at 11:38:27AM +0530, Viresh Kumar wrote: >>>> On 17-01-24, 16:34, Sibi Sankar wrote: [...] >> root@juno:/sys/devices/system/cpu/cpufreq# cat boost policy*/boost >> 1 >> 0 >> 0 >> >> root@juno:/sys/devices/system/cpu/cpufreq# cat >> policy*/scaling_available_frequencies policy*/scaling_boost_frequencies >> 450000 575000 700000 >> 450000 625000 800000 >> 775000 850000 >> 950000 1100000 >> >> If I disable system-wide boost I see the correct influence on >> 'cpufreq_pressure': >> >> root@juno:/sys/devices/system/cpu/cpufreq# echo 0 > boost >> >> [  439.466682] cpufreq_update_pressure() cpu=1 cpufreq_pressure=280 >> [  439.472797] cpufreq_update_pressure() cpu=2 cpufreq_pressure=280 >> [  439.478889] cpufreq_update_pressure() cpu=0 cpufreq_pressure=79 >> [  439.484852] cpufreq_update_pressure() cpu=3 cpufreq_pressure=79 >> [  439.490843] cpufreq_update_pressure() cpu=4 cpufreq_pressure=79 >> [  439.499621] cpufreq_update_pressure() cpu=5 cpufreq_pressure=79 >> >> reflecting the max frequency change from '1100000 to 800000' on CPU1,2 >> and from '850000 to 700000' on CPU0,3-5. >> >> root@juno:/sys/devices/system/cpu/cpufreq# echo 1 > boost >> >> [ 2722.693113] cpufreq_update_pressure() cpu=1 cpufreq_pressure=0 >> [ 2722.699041] cpufreq_update_pressure() cpu=2 cpufreq_pressure=0 >> [ 2722.704962] cpufreq_update_pressure() cpu=0 cpufreq_pressure=0 >> [ 2722.710842] cpufreq_update_pressure() cpu=3 cpufreq_pressure=0 >> [ 2722.719644] cpufreq_update_pressure() cpu=4 cpufreq_pressure=0 >> [ 2722.728224] cpufreq_update_pressure() cpu=5 cpufreq_pressure=0 >> >> What doesn't work for me is to disable boost per policy: >> >> root@juno:/sys/devices/system/cpu/cpufreq# echo 1 > boost >> root@juno:/sys/devices/system/cpu/cpufreq# echo 0 > policy0/boost >> root@juno:/sys/devices/system/cpu/cpufreq# echo 0 > policy1/boost >> >> Here I don't see 'cpufreq_pressure' changes. >> >> BTW, what's the use case you have in mind for this feature? Is it to cap >> high OPPs for CPUs in a certain CPUfreq policy? > > Yeah, that's exactly the use case for X1E. Boost frequencies defined in > the SoC are achievable by only one CPU in a cluster i.e. either the > other CPUs in the same cluster should be in low power mode or offline. > So it's mostly for book keeping i.e. we wouldn't to intimate incorrectly > that the CPUs are running at max possible frequency when it's actually > running at a lower frequency. I see. What about the issue with the settings of the global and the per-policy 'boost' file? On my Juno-r0 the initial boost values are: (1) Initial setting: root@juno:/sys/devices/system/cpu/cpufreq# cat boost policy*/boost 1 0 0 Should they not all be 1 ? (2) Disabling system-wide boost root@juno:/sys/devices/system/cpu/cpufreq# echo 0 > boost Here I see 'cpufreq_pressure > 0' for all CPUs. (3) Enabling system-wide boost root@juno:/sys/devices/system/cpu/cpufreq# echo 1 > boost And here 'cpufreq_pressure == 0' for all CPUs. (4) Disabling boost for policy0. root@juno:/sys/devices/system/cpu/cpufreq# echo 0 > policy0/boost root@juno:/sys/devices/system/cpu/cpufreq# cat boost policy*/boost 1 0 1 Here nothing happened. But I was expecting to see 'cpufreq_pressure > 0' for CPUs of policy0: root@juno:/sys/devices/system/cpu/cpufreq# cat policy0/affected_cpus 0 3 4 5