Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp4767737rwb; Mon, 21 Nov 2022 11:36:41 -0800 (PST) X-Google-Smtp-Source: AA0mqf41qM+y7gwl8FR9a2nMcU/DrK/vK0aSK0SEte4840pZzIbxl4si9S600mrqOA2OqkvH/YlE X-Received: by 2002:a05:6402:4a:b0:461:aa10:cb0c with SMTP id f10-20020a056402004a00b00461aa10cb0cmr17997470edu.383.1669059401642; Mon, 21 Nov 2022 11:36:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669059401; cv=none; d=google.com; s=arc-20160816; b=sWs4fqpp2D4q2o4wzQZ5TFCMn8wGkfi1PL4WaOeAvqWFk3Ewdqdh4dSHWsbYhwKcsD tAPz36kIAdDkBQB8YdinUhbOhLkeiBZ7W5GCoVGAicVKew/Vu7WQGxCWCfuLjaySc5mN PuVKNToHbpVcpOI9zrvPnwc8BNklzImU/wgH6em519a/O25AmmzE8wS2a7/NqCXLhgL2 AbLxNQLN67A1R76PmUjug00P9CpR36VuOIPbFS+8dClcBkgbkhjD6NGr5wAcg13mDhpv NeZDORyxNM7pqgtMXuEDjClDt0IUqOulCU9AZfLkNSEYHbe+2AwDc2Od+EnvREBeclki X9QA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=qNAiL7GtA1WBt+BkHFGHuULkAkKvbYHFnVpk3923atI=; b=QgMnC9j4W7Xn1xIieQT4ND2zSKuEuBGTOE37ELmLye7EpMXFlGPnueAwRVfGG5MzCh DAwi0gztqkneVPjpBjvTyV8bAL70K7NeEvfoLIYSi8AZ0Faun0DNfWJ1YZwM+GZPPh/S aVTPPWuGprpFKjAyE8OskIrwP+qonnK+BV34jc/Mc7KcYjF7U2bwTjcxCo2hVH/4QVq7 vynq8SyOtFb/6b+ZRC/2rXeisYH69m3s604vqZZ9R+4DVIRP6G4VZ4kK7xrYD/Q1ARuI 6+QdZwMzPzd2RzAWXg0MlHr8svle3ycGWiLDhfObITCjYMiRty6VlmSQmLS3HcftavQ5 8F0A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rh16-20020a17090720f000b0078e1b6060f7si8154185ejb.299.2022.11.21.11.36.16; Mon, 21 Nov 2022 11:36:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231496AbiKUTTK (ORCPT + 92 others); Mon, 21 Nov 2022 14:19:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231344AbiKUTS4 (ORCPT ); Mon, 21 Nov 2022 14:18:56 -0500 Received: from mail-qv1-f43.google.com (mail-qv1-f43.google.com [209.85.219.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F03C613DD1; Mon, 21 Nov 2022 11:18:53 -0800 (PST) Received: by mail-qv1-f43.google.com with SMTP id df6so6436067qvb.0; Mon, 21 Nov 2022 11:18:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=qNAiL7GtA1WBt+BkHFGHuULkAkKvbYHFnVpk3923atI=; b=3P6I+ntXmu4qthWFKbSMEy7vsR752oIf8wVgxeUp+rQ8KdML8kZf4suQf+WANKT7gb A6xQ2AHGXCyUzjWURed/icxFwkORJgqtyjppe0mKRbveAuQ/Xha/3JZCRIgwKwyHRm9s kbgqT3VvK2lQTXXvIBPFmqkF+I5+AWB7G4eE87O15JA8/NdigZJ12rCES1WPfRbrk8JL ruLMna4JaL1YiE45LuX3Et2qzWjOVytTnjjrd0qbV6gixVHLouIv/6M8zq30fSn8oCdb 4ZZijVZb3p+7B3rc+lLvQtv4G0d/f6GA1Wkn01t51R56I05F8cIEHCforXlNxTUYOFux hSxw== X-Gm-Message-State: ANoB5pliaTndG4Kw6J/Lq2jWBbQIShFL5qt6l3TIrlJ+6GUIu3jRG7by 16brzWlfD36phI03LrI62UVf04IfbwFbY9FHuzA= X-Received: by 2002:a0c:c589:0:b0:4b1:a9ac:21de with SMTP id a9-20020a0cc589000000b004b1a9ac21demr489868qvj.119.1669058332574; Mon, 21 Nov 2022 11:18:52 -0800 (PST) MIME-Version: 1.0 References: <20221110195732.1382314-1-wusamuel@google.com> <880b7332-562c-4934-4e92-493b112568c9@arm.com> In-Reply-To: From: "Rafael J. Wysocki" Date: Mon, 21 Nov 2022 20:18:41 +0100 Message-ID: Subject: Re: [PATCH v1] Revert "cpufreq: schedutil: Move max CPU capacity to sugov_policy" To: Sam Wu Cc: Lukasz Luba , Saravana Kannan , "Rafael J. Wysocki" , Viresh Kumar , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , "Isaac J . Manjarres" , kernel-team@android.com, "Rafael J. Wysocki" , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no 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 On Fri, Nov 18, 2022 at 2:00 AM Sam Wu wrote: > > On Wed, Nov 16, 2022 at 3:35 AM Lukasz Luba wrote: > > Which mainline kernel version you use in pixel6? > I am using kernel version 6.1-rc5. > > > > Could you elaborate a bit how is it possible? > > Do you have the sg_policy setup properly (and at right time)? > > Do you have the cpu capacity from arch_scale_cpu_capacity() > > set correctly and at the right time during this cpufreq > > governor setup? > > > > IIRC in Android there is a different code for setting up the > > cpufreq sched governor clones. In mainline we don't have to do > > those tricks, so this might be the main difference. > This behavior is seen on the mainline kernel. There isn't any vendor code > modifying the behavior, and the schedutil governor is being used. > > > > Could you trace the value that is read from > > arch_scale_cpu_capacity() and share it with us? > > I suspect this value changes in time in your kernel. > There's an additional CPU capacity normalization step during > init_cpu_capacity_callback() that does not happen until all the CPUs come > online. However, the sugov_start() function can be called for a subset of > CPUs before all the CPUs are brought up and before the normalization of > the CPU capacity values, so there could be a stale value stored > in sugov_policy.max field. OK, the revert has been applied as 6.1-rc material, thanks!