Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1388213pxu; Fri, 16 Oct 2020 10:39:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+PZ0RqNL1qY02cSR/V4ZO1CvHuKvtsrqBa2N5BLlHXfFXqBBmpsXgdiomBhVCdCl8zs2N X-Received: by 2002:a50:e887:: with SMTP id f7mr5228895edn.276.1602869968810; Fri, 16 Oct 2020 10:39:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602869968; cv=none; d=google.com; s=arc-20160816; b=PqrSUHdtBrLX7yrUZKT1gIADMaME2c6k1XJ13uU27AFpKUVbj3VYodRX+7Yciyu8H0 Bf9yYAy+TVw/EVlsAvad529SCGA3MKWRjWlmUQ02LJDZ6qLTRkV9sgyKZX3PIU8qnPdr HgQmZFdV0hvtDV4yHwKpWHrCsUJVaIFcNrc6cLvdmp2o9k23YY6dcHOBZpEFXpmPwCW/ YqMWGkmdsET6kvysSX4RpSkKnfhZ+IBPcmRYhmVEkhiAYuvgVpQAOZsM074G+ID/JcPN 8bZor78ua03J3oJbPFVr5DxtkQxAOs7orcwrrH+tQl3ZFCer5loODCf9muEBeC5fATm2 6mzQ== 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=uNjJL9XRXf6UiVLAufuLhgqCl6U0FzLOoCk4A9Q+UKg=; b=TFG6QIwAA8M0CRU+0nTGgywLwNjRouVZRo88pgref5j5Bngua5y85uiXMd75Hdf6hk eZCTrSVF2ND/WP6mWMCtJOb6O6L9eFSqjTjw+QSFccvF9uaj9AxQ+K/DHGIP75k7vedQ Una1/9SumyVy0oLkOjfeX6zTdN4PgC7tbWuT4czX2AGh95XR2JIAqsmzWDlF+6EiCYf3 4Ai/mqCcLj2GRj+92+hpbz9DRuP+gyyChMy9/YKUTVXFATlZev+fj8pmgua/9JHF9dLA jrCTzd9V8V/MyUDmmCs3qGUnqvKaIAkIwy1HX9QqKRhFf98Fy6Iv2Y8O1RVPMWQrvNGI ePfg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w14si2146688eje.646.2020.10.16.10.39.04; Fri, 16 Oct 2020 10:39:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S2392035AbgJPRgb (ORCPT + 99 others); Fri, 16 Oct 2020 13:36:31 -0400 Received: from mail-oi1-f195.google.com ([209.85.167.195]:32929 "EHLO mail-oi1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733088AbgJPRg3 (ORCPT ); Fri, 16 Oct 2020 13:36:29 -0400 Received: by mail-oi1-f195.google.com with SMTP id s21so3312723oij.0; Fri, 16 Oct 2020 10:36:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=uNjJL9XRXf6UiVLAufuLhgqCl6U0FzLOoCk4A9Q+UKg=; b=jCWdp34+7nVQbbNjoQaqxefXZl833KpTUtBo8w92GApZKxICvHKur1kE3JjEAv/aCb PNnZLsMz4fRtKCZi5BLmM/MFHWaMt4H7m2EbIfOEBsvpWST8u1o8wi84g2uEWm8P9tfo B3MpDFTe61LOmloK1R/zJVd19s/Kmmh+q7YAueuAtS13iGuchWiXKYPZkc4uIPysKH5W 1jwbtdnQRUMUvEiSQFlSRFkTCRpeeC4fGGWsrMdnh1UK1SQOkuUn/7z78PQeHjC0cyC6 lztl/85/rn44eZ4IyJkR0v8jiWPmR8zhxZMoyFaOgxkuajpy4qf7gt4M3jUK/3btQIKS 0IOA== X-Gm-Message-State: AOAM530nF4cc3i0SxfxW+PEocdmj87xkrqGi8s/KAFFuhT/xev3ade3h T8sk3Mb46PAypw12lYJolXFaflLZ2fHHrr54TI66He0o X-Received: by 2002:aca:724a:: with SMTP id p71mr3250305oic.157.1602869788870; Fri, 16 Oct 2020 10:36:28 -0700 (PDT) MIME-Version: 1.0 References: <20201016163634.857573-1-wvw@google.com> In-Reply-To: From: "Rafael J. Wysocki" Date: Fri, 16 Oct 2020 19:36:17 +0200 Message-ID: Subject: Re: [PATCH] sched: cpufreq_schedutil: maintain raw cache when next_f is not changed To: Wei Wang Cc: "Rafael J. Wysocki" , Wei Wang , Viresh Kumar , Quentin Perret , "Rafael J. Wysocki" , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Linux PM , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 16, 2020 at 7:18 PM Wei Wang wrote: > > On Fri, Oct 16, 2020 at 10:01 AM Rafael J. Wysocki wrote: > > > > On Fri, Oct 16, 2020 at 6:36 PM Wei Wang wrote: > > > > > > Currently, raw cache will be reset when next_f is changed after > > > get_next_freq for correctness. However, it may introduce more > > > cycles. This patch changes it to maintain the cached value instead of > > > dropping it. > > > > IMV you need to be more specific about why this helps. > > > > I think the idea of cached_raw_freq is to reduce the chance of calling > cpufreq drivers (in some arch those may be costly) but sometimes the > cache will be wiped for correctness. The purpose of this patch is to > still keep the cached value instead of wiping them. Well, I see what the problem is and how the patch is attempting to address it (which is not the best way to do that because of the extra struct member that doesn't need to be added if I'm not mistaken), but IMO the changelog is way too vague from the problem statement perspective.