Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp397470pxb; Tue, 9 Feb 2021 03:18:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJzpRvJsMbGUYlIP/etAh1+BOZevmwainV97D+iG3FeShDjdG0KOp0ItMSEjRrPLih0T6Gs0 X-Received: by 2002:aa7:cdcd:: with SMTP id h13mr22075335edw.11.1612869538864; Tue, 09 Feb 2021 03:18:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612869538; cv=none; d=google.com; s=arc-20160816; b=alkNUYEajxRokWA/RM2383+163PhuzrZ8kxiy609dTr08wcIck3ZE0p38aLMHNOBYs KLtYGW1dhJh+bJK+kJ4KyIieLby5N7eZWhhmFrjL59jubbqG4ZUu5O1VrHDq6SlLsFQa nTEyDtlTI7srWeB7CooxmfGFZQu8yEubDjCumcdLOE+9lR612nPhKa2fMZxNSvra5MUM llkf5sSy6YnD/AOKs2Vd065wJmV9pmqZmcLzzX346MYzfcXmsJT5DY/Tvbi8D3bXUjjv kcuqsztQ8eI0BiPGgO2mmfQFTnTFQTu+WyFxGczlkNQeZuJZ95L5IXB51OTF4PV6T0Tn 0yyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=1gfRAu+EF22TJgGrs/thl2AAOrMdVzWuE7892b9S/rs=; b=ZZp6Rbfp5m+TF7XZwehj1Sv36kBjbAIp1BOvSIO+zNBclBGKOQ9X9kVROh3IfVRPwn 9A2DS576tnSbMkFe0KaVAjopqnBbS76TuSpjo2sMy1MwElL6x5uEI1UYd131Xv5/+RbW 19zVVOn8Zrn8sSzaBpwj6ggmiisluNmyGhcSFUCWTdGqKHWB+4LTBRW9aYW+TsdZgYvd cUZrmGRCRuklm75g5LcmCt36EoA+YDNFIIoXEBC6DjmsUpZz+aKcANYQzdqDqbGyU07c PSAS1iQpI8YvI9uAci0ejFozArTMbELllmWfMmwMv8BoKq4uzsapP/ouZnFQ3vV5rrI8 mK9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gMlqXT8r; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b5si12494910edq.1.2021.02.09.03.18.35; Tue, 09 Feb 2021 03:18:58 -0800 (PST) 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; dkim=pass header.i=@linaro.org header.s=google header.b=gMlqXT8r; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230140AbhBILRA (ORCPT + 99 others); Tue, 9 Feb 2021 06:17:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230264AbhBILMH (ORCPT ); Tue, 9 Feb 2021 06:12:07 -0500 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1580BC06178C for ; Tue, 9 Feb 2021 03:11:27 -0800 (PST) Received: by mail-pj1-x1036.google.com with SMTP id nm1so1362195pjb.3 for ; Tue, 09 Feb 2021 03:11:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=1gfRAu+EF22TJgGrs/thl2AAOrMdVzWuE7892b9S/rs=; b=gMlqXT8rWIpJyD5epCoxTSOMoDQeGgVe/OYZzHq885OM3Eec7ej1Ha+es9Qi5ghM0n Qzia5l+bxr4acSJhvwVqZ5kdPAcK41l24tLJWRsP+f71m7t51KZPx7C+XhDJYLv4hJBG fRuoLRfO+ARlgG4HF1L3wVXCp68Mpf5XYEbN+AG2dq8Gzc+DHZgM/9yi3oP73hTraLLi 3OAMArWW73mLCyjy9/EuMjm3+H3tAQWtvTpNV7t42N+dnC0FZKly0Xh9cphxwhtN9wap WGjEBfkZzSQmNbn8Vw0tgsTwxhq0IjLH00SzIBxf6A9tQ0ZSZSTmpWFOSu48DcJ88nA1 ueog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=1gfRAu+EF22TJgGrs/thl2AAOrMdVzWuE7892b9S/rs=; b=ZplBRcV6EOwspnb3ZuiBMGC1HmeGLrbETSJdLZ+u0aqTCQzuLi+aj9OKnC1xSkUudq E5gNzVxZGhjmOdWOzz/OYf1lZNz3zBJArOZBLmDFzhRYUlyvEb3xYlO2q22DBqSNMn2f 8qhboVM+Vn28G9rftfAdFu3vta6iW1gCLmlpa0xuU5c3IWJ6Hf87JCu9vw2NpcLdDUSr P+JACAPrCE6BCQJHz+MnN9HQ3Ud8mP8uenbxjKY3F0kBIaVl/XGNpSm4HEHkEYqRSyhg 8DpMZwzu18qpMEKExNJro00PDjYr1qUXFGhZUH5tiLRT1VYVyaOBhYkMBqLjwu+TOnvr K+pw== X-Gm-Message-State: AOAM532HYQ6Yw+jwCJ/WL4noHbV1Mr823LlrtSNO69+GnnZ/m/X4Bmv6 d5MVoyRVG1oG1vpZSugXeeIt5g== X-Received: by 2002:a17:90b:33d1:: with SMTP id lk17mr3582252pjb.102.1612869086445; Tue, 09 Feb 2021 03:11:26 -0800 (PST) Received: from localhost ([122.172.59.240]) by smtp.gmail.com with ESMTPSA id ep14sm2268423pjb.53.2021.02.09.03.11.25 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Feb 2021 03:11:25 -0800 (PST) Date: Tue, 9 Feb 2021 16:41:23 +0530 From: Viresh Kumar To: Yue Hu Cc: rjw@rjwysocki.net, rafael.j.wysocki@intel.com, mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, huyue2@yulong.com, zbestahu@163.com, zhangwen@yulong.com Subject: Re: [PATCH] cpufreq: schedutil: Don't use the limits_changed flag any more Message-ID: <20210209111123.kzx36ghdac4rpfuh@vireshk-i7> References: <20210208030723.781-1-zbestahu@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210208030723.781-1-zbestahu@gmail.com> User-Agent: NeoMutt/20180716-391-311a52 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08-02-21, 11:07, Yue Hu wrote: > From: Yue Hu > > The limits_changed flag was introduced by commit 600f5badb78c > ("cpufreq: schedutil: Don't skip freq update when limits change") due > to race condition where need_freq_update is cleared in get_next_freq() > which causes reducing the CPU frequency is ineffective while busy. > > But now, the race condition above is gone because get_next_freq() > doesn't clear the flag any more after commit 23a881852f3e ("cpufreq: > schedutil: Don't skip freq update if need_freq_update is set"). > > Moreover, need_freq_update currently will be set to true only in > sugov_should_update_freq() if CPUFREQ_NEED_UPDATE_LIMITS is not set > for the driver. However, limits may have changed at any time. And > subsequent frequence update is depending on need_freq_update. So, we > may skip this update. > > Hence, let's remove it to avoid above issue and make code more simple. > > Signed-off-by: Yue Hu > --- > kernel/sched/cpufreq_schedutil.c | 11 +++-------- > 1 file changed, 3 insertions(+), 8 deletions(-) Acked-by: Viresh Kumar -- viresh