Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1721936rda; Tue, 24 Oct 2023 00:49:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGhHIUeBWWpkYsKgeln7vITGz2v3cKlEOPi/Xja1KVRtIVo/gPervE2+fhj1Lway9Eyj4fg X-Received: by 2002:a05:6359:2d48:b0:168:e841:5450 with SMTP id rm8-20020a0563592d4800b00168e8415450mr3282905rwb.0.1698133777805; Tue, 24 Oct 2023 00:49:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698133777; cv=none; d=google.com; s=arc-20160816; b=aPfP0i5nRcygFLcgTxLbJZ9SfMqQYWGv+i6ZXDcIsp89+GYa/YTw7ZyYZo1a/MgE7c +SfZnipFQNrBvjpGnlbOyAFyUkzSr2gwszuJycsjkJbtQn3f1zoQJbTD3ey3zXkp3gqG kNqB+SvUM02fonQVJHQCXPqCSA2QZsxTzZs1MX5LiuuBbL3RuRzN3Yi+TmpD8xNGeRkN bdn+ymMwf7541j/w4eAmnw3i587/cgFUxXEMp0IlRhE3T/70SwgEjqk8YyeWLwvVb92A O2H0+iGx5ZbJlH9t3j8V4GKAW1UdC5Vt7mjXW7p8mwEBcF4Dzq/udWN78cDpHBavd8KT 07Aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=ujAHkQGKCjLNVJEixxFqMMEF3yay08C5Fiyc9UthNmc=; fh=a4PzAt7AN7oLfta8FBtHbHO965aNu+DCKo/l6k2osgQ=; b=KxqoSl1oQ5+16HK2Jp5xQ1RDk3aS5+rHtSbpd3tuTqa8Usm7v8BLVon1L8pbbyNSkM PbppVhaEUbELKlUEWIEo8blPQWOGzk7jn4n65weBS6Krlr5wEUiil8SCkK1DB8BIt/rt BdqlX997E3poDOLw9jDCMl/kIZs+ar6UBxEMMNVt2K7jTuufvCxRDIYlHdPncy+uid6n KsZHzA9DRWDtAXYcUOE6y2n+qppKFoKbLf6T9pnGcsEj9z/56YKKXTI0XZIV/o0aQs3b RjcWuxR9pJs4U1yYMCUVvLkkiz/KAmVzx66ArIH3ThYR/GHyM4jo3fy0ByZ8eSw32SrM yZew== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id a21-20020a63e855000000b005ab2613a571si8363627pgk.495.2023.10.24.00.49.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 00:49:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 8502F8031B02; Tue, 24 Oct 2023 00:49:36 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233734AbjJXHtc (ORCPT + 99 others); Tue, 24 Oct 2023 03:49:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232544AbjJXHtb (ORCPT ); Tue, 24 Oct 2023 03:49:31 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2D7A4E8; Tue, 24 Oct 2023 00:49:28 -0700 (PDT) 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 8B3402F4; Tue, 24 Oct 2023 00:50:09 -0700 (PDT) Received: from [10.57.83.179] (unknown [10.57.83.179]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 60BCF3F738; Tue, 24 Oct 2023 00:49:26 -0700 (PDT) Message-ID: <749c927a-119a-41ea-adfd-9e778d640d16@arm.com> Date: Tue, 24 Oct 2023 08:50:18 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 03/18] PM: EM: Find first CPU online while updating OPP efficiency Content-Language: en-US To: Daniel Lezcano Cc: dietmar.eggemann@arm.com, rui.zhang@intel.com, rafael@kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, amit.kucheria@verdurent.com, amit.kachhap@gmail.com, viresh.kumar@linaro.org, len.brown@intel.com, pavel@ucw.cz, mhiramat@kernel.org, qyousef@layalina.io, wvw@google.com References: <20230925081139.1305766-1-lukasz.luba@arm.com> <20230925081139.1305766-4-lukasz.luba@arm.com> <59ea8714-2ed8-f64b-e8d4-93cd6bf4ff92@linaro.org> From: Lukasz Luba In-Reply-To: <59ea8714-2ed8-f64b-e8d4-93cd6bf4ff92@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 24 Oct 2023 00:49:36 -0700 (PDT) Hi Daniel, Thanks for looking at the patches! On 10/23/23 18:06, Daniel Lezcano wrote: > > Hi Lukasz, > > On 25/09/2023 10:11, Lukasz Luba wrote: >> The Energy Model might be updated at runtime and the energy efficiency >> for each OPP may change. Thus, there is a need to update also the >> cpufreq framework and make it aligned to the new values. In order to >> do that, use a first online CPU from the Performance Domain. > > I'm failing to do the connection with the description and the change. > > Perhaps, the changelog shall explain why 'cpu' must be replaced with the > first active cpu ? It's not a big problem now for EM, since during the boot the first CPU in the 'policy' is actually registering the EM. Although, this is an assumption and for the new runtime update of EM, we cannot assume that first is online. That's the motivation of the change. In a corner case all CPUs might be put offline, but the EM is still there because we never unregister EM for CPUs (to not race with task scheduler). I will add that description to the patch header. Thanks, Lukasz