Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2859195rwb; Thu, 17 Nov 2022 17:45:04 -0800 (PST) X-Google-Smtp-Source: AA0mqf4mOH3PtwzfbB/Q4aVgFhNi7lbPfYkydKuCSHCyf/MgR1esy4fz7PGYTCzSo4VgDSvEAxbn X-Received: by 2002:a17:902:6946:b0:188:5c52:83e1 with SMTP id k6-20020a170902694600b001885c5283e1mr5453814plt.128.1668735904473; Thu, 17 Nov 2022 17:45:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668735904; cv=none; d=google.com; s=arc-20160816; b=0xmRwehVCJl7ajXTp2WI7U8s92oK6Kn458n/QMV126kED3hMr/IBmwlGyRbAiuIoZI DCiwMZwMeejcOXFsOflU8CUhTqBIZl08gk4TDWoyBhDkc0zxDVsk8EjdvzBVEI6RkZRP ksS6GExUzNXSaK8l0bb0T8bPyo+5Pf+fZq5R2WPNG9q7E6GhLHKJB0WZ5m+StAygGpsZ 49wfs1Z0QnR3LkH1YJ8OwCneuw36X/BEaP4RL2zKK7+4gxl4Kn7bo4S5iyRrB1Rbt32L tw5ifKLA7bSzLR07UW863EdrfjTxBWrXk9G/+f7g76EhGbDfIbxE/+/YcyJBF4TzFBbL fOYg== 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:dkim-signature; bh=tSyjpoEZyYB7sc65RrNJJW9qvsOFSuR2P+GcFGf3J/U=; b=X7eX14kHnllTZXYorB/47qlNulqydMF0pqVr3meUgvuaxg2dVEV22LIe/FXSCBcZhw s7pggHF5kwY2TuNwOAt0cAkjCONA6F7VbNCrhbT6/ph5aT+6fzH1rwhF7VSYwcfRGLVS 6VfewB15D9lqm9f/5T4inuXOwWFw0AwZQxp+wljx+NV5LNWxnQ4o/XRGHqL9fe/UOjTK FMT2m8worUl/NXP8VgBTwa8xblzmqJAajajvXULwgvmTzZ2l1eaNXc9RCLl/z6rXendp MG2cu/MvgojEY5154I7/iE4ZPvIzkB/Aeunwnw4YCGDuRz6pANmPF7BjaU7vLrS2vt6d xPcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=Y84B3WGL; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w11-20020a170902d70b00b001837ff673d3si2256992ply.262.2022.11.17.17.44.50; Thu, 17 Nov 2022 17:45:04 -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; dkim=pass header.i=@google.com header.s=20210112 header.b=Y84B3WGL; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240823AbiKRBA4 (ORCPT + 91 others); Thu, 17 Nov 2022 20:00:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240809AbiKRBAq (ORCPT ); Thu, 17 Nov 2022 20:00:46 -0500 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47E3987575 for ; Thu, 17 Nov 2022 17:00:40 -0800 (PST) Received: by mail-pl1-x632.google.com with SMTP id jn7so1359909plb.13 for ; Thu, 17 Nov 2022 17:00:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=tSyjpoEZyYB7sc65RrNJJW9qvsOFSuR2P+GcFGf3J/U=; b=Y84B3WGLdvH4fmWPofyx680oHlFFLc+robIV5oy+HTKv4FeXfYjzPzoN2dDqAgS1Of +YvTfyCodl8LyRnTxhwL3pybk360gMJaw28xwCjx6l9We5pw6rLh1p3c1qyHzcyHP+ul ck2a/HWu6vaGI5kP2GWJH+F0U+2cGG9AONx0+GVEiuDcD5K46E+wlWsT4ZO71rraxJ8G q5VIC1vf+CX2nWsK2XfBM43up0ltTwfl1JmgVMVXvuJHagd10wXHy3aaeX/zpiZOWhnX KHz/U/+3J0U4i+lZgZJJEdHaZ3E3RZJ4yjWwH7+P0tOxO/Arl2hlVxvMd40BBIuLyP10 wvOw== 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=tSyjpoEZyYB7sc65RrNJJW9qvsOFSuR2P+GcFGf3J/U=; b=AHbUtrPjZ7mU67elpAkVGqh3XFN92yXtCQtmLNmlwx/fj2nMsKAZWG/Q8wvtgnIHth LvTqBo7m/KH1A6mZC9MaKVZVCPbwQpJO9aJmiZwaepVPHlJTWDjq2UbX27X6H3qD1/I4 zt/NHMBMSDs1YgX/br4IsuvOZRK9qhEyAtaXPFUD4ygYbPQstHMV6ngaO8rYiuyfF++x wXQYpThUZMiNpgS9FPL0NrQc1WdJ375Pg23sur1bhVGL+LMcRMXZaTFWeKhwNQl9IM7n MxYn2x1CGT3xSOYTodao67ViP12GmpEcJLV5sKZfzJasbs4M9M3fM6ENDyELf2lFFSFE 7rVA== X-Gm-Message-State: ANoB5pllo07ElIN7mUZk1WIuGQWuAnrU/6/unwyS/TEuaXoIsZDvdrwf 5Z98ZAcaKq9tUCbW974bmLfJFCdcuYkTleSAtW6IGQ== X-Received: by 2002:a17:902:b691:b0:188:4e75:7365 with SMTP id c17-20020a170902b69100b001884e757365mr5310036pls.102.1668733239520; Thu, 17 Nov 2022 17:00:39 -0800 (PST) MIME-Version: 1.0 References: <20221110195732.1382314-1-wusamuel@google.com> <880b7332-562c-4934-4e92-493b112568c9@arm.com> In-Reply-To: <880b7332-562c-4934-4e92-493b112568c9@arm.com> From: Sam Wu Date: Thu, 17 Nov 2022 17:00:28 -0800 Message-ID: Subject: Re: [PATCH v1] Revert "cpufreq: schedutil: Move max CPU capacity to sugov_policy" To: Lukasz Luba Cc: 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=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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 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. Best, Sam