Received: by 2002:a05:7412:8d11:b0:fa:4934:9f with SMTP id bj17csp483115rdb; Mon, 15 Jan 2024 03:59:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IGeyWxZ5luIsPg3EbHKHS69pIiCm4054T7uZu6OW5iPtdZE++3B8jXDMz00/kSeJ5MC24oG X-Received: by 2002:a17:90b:201:b0:28c:8881:8e3a with SMTP id fy1-20020a17090b020100b0028c88818e3amr2415619pjb.74.1705319984416; Mon, 15 Jan 2024 03:59:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705319984; cv=none; d=google.com; s=arc-20160816; b=ZKnn92UekoODZ0QIlUUaYgfpoK+4zzjJXg/RdfxmzrlcxT8UsuB+L3V7AFoX8QLJNt TEyGN3IeNxs1JGif6KCQhYTF1wg1IUWv1xF7vWMRHENOjX234yF4uiUewQJz6dLVsjdo eMuMkOVIRljSCvZo3dGC6HCdMRdNWcK6ySJnvjJFDOc3sFiWHy34zegeFQIsD1t4C/yj dOEjWN3zkPNVmrAegHdDZUzKbw3uCeJIkFuipgBPVW+Kagex+U3T+qsLOYveGCioWROe Y92qeIHm+zMLf0RKfAwmKmj2lvaFJPu5MFmuGTWUTyEEjrNTIUl95GkWdJDZ1MxJi6Nm jhXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=O5hovQlCyFfUT1w/kNP0sdfTe0f7KSxDUv62cZRI4N4=; fh=w+XtlfoXwAQYMS4nF8oZs/9Bj6FVO3e5OFqYjaSNQfI=; b=CuqE5TBgTmYyvoi9RLrqzm/DmhMWe8QGGz+pe50AOfYFsm3PPqyi8yV7aaLmD46fcL sijS3rDqpxSjdaNLQyXV3lUGzeB8c5e3ubP711I0ByO4Q7LZTRvPY02AEFMNV2d0hkiF f4/4D3GJAaGQlkV1JMZzPy+y2kkiMSNQD0TzXKJoDtoPSQmGLfAGP5qnu+KHwtYnw1fV KQz9hASpSoGww9/NtoNEOUlsz+X88vo2K5dInf0rEgbC8ijQLzGLivwhHsMQA2VI0sIF G5z+ngO3UeGiNi5qgwCUB8S8thvtxuhCnckwDKBHoDPaPiVJzxgsZTBqnwrjgeoSMTB3 ORQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@layalina-io.20230601.gappssmtp.com header.s=20230601 header.b=O5JVqAyJ; spf=pass (google.com: domain of linux-kernel+bounces-25945-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25945-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id r1-20020a17090aad0100b0028ae45912afsi8870492pjq.50.2024.01.15.03.59.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 03:59:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-25945-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@layalina-io.20230601.gappssmtp.com header.s=20230601 header.b=O5JVqAyJ; spf=pass (google.com: domain of linux-kernel+bounces-25945-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25945-linux.lists.archive=gmail.com@vger.kernel.org" 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 59D95B20F4E for ; Mon, 15 Jan 2024 11:59:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7A9882C695; Mon, 15 Jan 2024 11:59:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=layalina-io.20230601.gappssmtp.com header.i=@layalina-io.20230601.gappssmtp.com header.b="O5JVqAyJ" Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com [209.85.208.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9380A2C68B for ; Mon, 15 Jan 2024 11:59:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=layalina.io Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=layalina.io Received: by mail-lj1-f169.google.com with SMTP id 38308e7fff4ca-2cdc1af60b2so9948791fa.1 for ; Mon, 15 Jan 2024 03:59:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=layalina-io.20230601.gappssmtp.com; s=20230601; t=1705319971; x=1705924771; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=O5hovQlCyFfUT1w/kNP0sdfTe0f7KSxDUv62cZRI4N4=; b=O5JVqAyJb3xJ/YlGzK5uxnzHuLtwlUaTUXSM0LsNV6hGLVf2rcGdW97vmQ6V/OONrT 9FVCTToz3M/hLp8mOswnf59x0yxPqeVEbZA1DSAq5xpAEwtXinrKAYtCKe1Gil/ObPUf QR7+WMRuzxKGv93FoCGNxCGYvuxvvPiv+iJOg74c5S6R7+kVUJbGhtYkdyAqUFZeZqdI 8FwHM65K7CTyIAcWEHrHxPsIjvzmLL5vWaVmlNR+1j6yhPQxZVH6PE+OFmnD7XTSM9rJ wS1v+57pUg5uDRTsWl3fzXaax2FC44WkXtrAmJChpWcqpb66m/gi8PaxLhRDvwlZls8b n5vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705319971; x=1705924771; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=O5hovQlCyFfUT1w/kNP0sdfTe0f7KSxDUv62cZRI4N4=; b=L0QhRKxb3801uo3G+dLAA2ygroOmDue6RqYEEtqdK5ex205nZx/8eatJrbWcdsZJ0k 4HgQqlT/teuEMFqmfusarKpfTRvbfmEMyis0VyxLxP9X+JdT8DHJk9OL96X0DHx+LNEh GyIjW7B1Rp9ibuxDhvcU11j1REXaXJeoHpY4Stb6PTyxdZOdqZ+LRgL9zt+H3F6jtD72 dGZ+5LQVrfgGezFk0zluXlnUF/p71Mw3WY64699HbGlgGBnLufE6v4xjfUBBD3WrRHQ7 wfqwrI2JRz+BSnWmBOQARCHcVew+QOUB4DrXLsmQwKQN+Y0KpmYPCZo1gH81L0FwBH8x sDIA== X-Gm-Message-State: AOJu0YwvpHAu/0tGFVF2j0zpXjrVW7T8uX1zzFyW7HvYhF0itDnW5ctC EQYhhXa0YpU2qq+XAWob7xK2P8sArpppVA== X-Received: by 2002:a2e:9595:0:b0:2cc:df3f:9f83 with SMTP id w21-20020a2e9595000000b002ccdf3f9f83mr2379829ljh.64.1705319971394; Mon, 15 Jan 2024 03:59:31 -0800 (PST) Received: from airbuntu (host109-154-205-127.range109-154.btcentralplus.com. [109.154.205.127]) by smtp.gmail.com with ESMTPSA id w26-20020a2e301a000000b002cd7fe5655asm1351741ljw.88.2024.01.15.03.59.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 03:59:30 -0800 (PST) Date: Mon, 15 Jan 2024 11:59:28 +0000 From: Qais Yousef To: Wyes Karny Cc: Vincent Guittot , Linus Torvalds , Ingo Molnar , linux-kernel@vger.kernel.org, Peter Zijlstra , Thomas Gleixner , Juri Lelli , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider Subject: Re: [GIT PULL] Scheduler changes for v6.8 Message-ID: <20240115115928.rxafxbrf7i55hepj@airbuntu> References: <20240114091240.xzdvqk75ifgfj5yx@wyes-pc> <20240114123759.pjs7ctexcpc6pshl@wyes-pc> <20240114151250.5wfexq44o3mdm3nh@airbuntu> <20240114195815.nes4bn53tc25djbh@airbuntu> <20240114233728.hrmyelo66beaajhp@airbuntu> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Hi Wyes On 01/15/24 11:55, Wyes Karny wrote: > > diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c > > index 95c3c097083e..155f96a44fa0 100644 > > --- a/kernel/sched/cpufreq_schedutil.c > > +++ b/kernel/sched/cpufreq_schedutil.c > > @@ -123,7 +123,8 @@ static void sugov_deferred_update(struct sugov_policy *sg_policy) > > * Return: the reference CPU frequency to compute a capacity. > > */ > > static __always_inline > > -unsigned long get_capacity_ref_freq(struct cpufreq_policy *policy) > > +unsigned long get_capacity_ref_freq(struct cpufreq_policy *policy, > > + unsigned long *max) > > { > > unsigned int freq = arch_scale_freq_ref(policy->cpu); > > > > @@ -133,6 +134,9 @@ unsigned long get_capacity_ref_freq(struct cpufreq_policy *policy) > > if (arch_scale_freq_invariant()) > > return policy->cpuinfo.max_freq; > > > > + if (max) > > + *max = policy->cur * (*max) / policy->cpuinfo.max_freq; > > But when freq_invaiant is disabled we don't have policy->cpuinfo.max_freq. They are reported as 3.8GHz correctly for me $ grep . /sys/devices/system/cpu/cpufreq/policy*/cpuinfo_max_freq /sys/devices/system/cpu/cpufreq/policy0/cpuinfo_max_freq:3800000 /sys/devices/system/cpu/cpufreq/policy10/cpuinfo_max_freq:3800000 /sys/devices/system/cpu/cpufreq/policy11/cpuinfo_max_freq:3800000 /sys/devices/system/cpu/cpufreq/policy12/cpuinfo_max_freq:3800000 /sys/devices/system/cpu/cpufreq/policy13/cpuinfo_max_freq:3800000 /sys/devices/system/cpu/cpufreq/policy14/cpuinfo_max_freq:3800000 /sys/devices/system/cpu/cpufreq/policy15/cpuinfo_max_freq:3800000 /sys/devices/system/cpu/cpufreq/policy16/cpuinfo_max_freq:3800000 /sys/devices/system/cpu/cpufreq/policy17/cpuinfo_max_freq:3800000 /sys/devices/system/cpu/cpufreq/policy18/cpuinfo_max_freq:3800000 /sys/devices/system/cpu/cpufreq/policy19/cpuinfo_max_freq:3800000 /sys/devices/system/cpu/cpufreq/policy1/cpuinfo_max_freq:3800000 /sys/devices/system/cpu/cpufreq/policy20/cpuinfo_max_freq:3800000 /sys/devices/system/cpu/cpufreq/policy21/cpuinfo_max_freq:3800000 /sys/devices/system/cpu/cpufreq/policy22/cpuinfo_max_freq:3800000 /sys/devices/system/cpu/cpufreq/policy23/cpuinfo_max_freq:3800000 /sys/devices/system/cpu/cpufreq/policy2/cpuinfo_max_freq:3800000 /sys/devices/system/cpu/cpufreq/policy3/cpuinfo_max_freq:3800000 /sys/devices/system/cpu/cpufreq/policy4/cpuinfo_max_freq:3800000 /sys/devices/system/cpu/cpufreq/policy5/cpuinfo_max_freq:3800000 /sys/devices/system/cpu/cpufreq/policy6/cpuinfo_max_freq:3800000 /sys/devices/system/cpu/cpufreq/policy7/cpuinfo_max_freq:3800000 /sys/devices/system/cpu/cpufreq/policy8/cpuinfo_max_freq:3800000 /sys/devices/system/cpu/cpufreq/policy9/cpuinfo_max_freq:3800000