Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp3107595ybk; Mon, 18 May 2020 18:14:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMWZYlt+cXd4YxxuI0pO2E93O/V3q8PVaEpWyUpOtmPBQlpYg1H/YjYuoCKldvx7cacJWa X-Received: by 2002:a50:c2d9:: with SMTP id u25mr15567197edf.123.1589850890857; Mon, 18 May 2020 18:14:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589850890; cv=none; d=google.com; s=arc-20160816; b=l8xAaHBNN63pLJHVgzCvCa66huD6czAcDfae86kD9aOzhslz1xRlKorwGJY9KaeJvq byT3/cOR9iRTk4NedZw/OLqnnWAkSylQHH0ZgsSOEnCSanum/CJGsAINGhAu0Ot54Jm9 ofdbb6BUAk95ZO2rBZos7GJxYUO1vKIDMwmz1Ti5XKKgjrob3eNvpoH8TkvNMfoAVkBX fF151hhllhCORJIdcSS/zjukVp4qFCvwXOmdtgi8v0ejRuI7xZkF0Q4gTMgoX2FN2mdX RKRFQ0QEO60F7sHjEZm8vVsSaIciCFBa0MXDl81jWhOakium04vNgTuzw9hmDkc1Pwvd HSxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=jWlqV7wwnHb/+dCgTHRBsPQp+gLCqpnqYTSeOHa0x9Y=; b=UgZDN0wKvk9sQgqBZE1M+SL7tlQWneL9UKcmykRwdl6vyt6sspwb55tzAZeecd8tbr fDZovWnUiW3xuJ0vrXBo9NDzfrEQ4EH7q9Y8ssY+QscYNTxeP/1gqqzMnXK2g4Jsrw+Q yhZjaBUfO3YAUaKSrHBUUnMu5PYpUNowv5oxai2d5KF7enA29BaKhqLWpcY+kwACgKOe DpJWUMfcV3Z/hAMVjbaL8P6YYYXwJuNy5HLzJY0nfBwQ+08VPQzsWjRf/Rh++Q2QD7Og nk1gt6sSR7/b+mVvAIMsHyOgGT5NROO7vraw/HouwXGhYbrE49gGhvzttgkvec9Ipoya 7q3A== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b9si2015971edu.30.2020.05.18.18.14.27; Mon, 18 May 2020 18:14:50 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727902AbgESBMz (ORCPT + 99 others); Mon, 18 May 2020 21:12:55 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:38528 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726628AbgESBMy (ORCPT ); Mon, 18 May 2020 21:12:54 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 8C4B9BAC60E6982DA677; Tue, 19 May 2020 09:12:52 +0800 (CST) Received: from [127.0.0.1] (10.166.215.101) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.487.0; Tue, 19 May 2020 09:12:46 +0800 Subject: Re: [RFC PATCH v2 1/3] cpufreq: handle the return value of '.set_boost()' properly To: Viresh Kumar CC: , , , , , , , , References: <1589785808-12138-1-git-send-email-wangxiongfeng2@huawei.com> <1589785808-12138-2-git-send-email-wangxiongfeng2@huawei.com> <20200518074619.yznopcgqmoq6ds7t@vireshk-i7> <20200518114348.z55kpbhgbfxenrhm@vireshk-i7> From: Xiongfeng Wang Message-ID: <115bf0d2-8f23-d82b-3d2a-41dd3f124343@huawei.com> Date: Tue, 19 May 2020 09:12:45 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200518114348.z55kpbhgbfxenrhm@vireshk-i7> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.166.215.101] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Viresh, On 2020/5/18 19:43, Viresh Kumar wrote: > On 18-05-20, 13:16, Viresh Kumar wrote: >> On 18-05-20, 15:10, Xiongfeng Wang wrote: >>> 'freq_qos_update_request()' called by 'cpufreq_boost_set_sw()' reutrns 1 >>> when the effective constraint value of frequency QoS has changed. It's >>> not an error code. So handle the return value 1 of '.set_boost()' in >>> 'cpufreq_boost_trigger_state()' properly. >>> >>> Signed-off-by: Xiongfeng Wang >>> --- >>> drivers/cpufreq/cpufreq.c | 5 ++++- >>> 1 file changed, 4 insertions(+), 1 deletion(-) >>> >>> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c >>> index 4adac3a..bb6746e 100644 >>> --- a/drivers/cpufreq/cpufreq.c >>> +++ b/drivers/cpufreq/cpufreq.c >>> @@ -2540,7 +2540,10 @@ int cpufreq_boost_trigger_state(int state) >>> write_unlock_irqrestore(&cpufreq_driver_lock, flags); >>> >>> ret = cpufreq_driver->set_boost(state); >>> - if (ret) { >>> + if (ret == 1) { >>> + pr_debug("The effective constraint value of frequency QoS has changed.\n"); >>> + return 0; >>> + } else if (ret) { >> >> Rafael, IMO it is better to pick patch from Sergey for this as this is >> implementation detail. >> >>> write_lock_irqsave(&cpufreq_driver_lock, flags); >>> cpufreq_driver->boost_enabled = !state; >>> write_unlock_irqrestore(&cpufreq_driver_lock, flags); > > This is already fixed in the PM tree with a different patch Xiongfeng. Thanks for telling me. I will drop it in the next version. Thanks, Xiongfeng >