Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp2671130pxb; Mon, 11 Jan 2021 16:43:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJwMa5rdkH5bmxLLNIbEPcPw2r1c6sh7GM3HoXYTw5hGGBzMwPBRWbIr4wVg+z4ssOHskiRS X-Received: by 2002:a17:906:58f:: with SMTP id 15mr1328419ejn.67.1610412203022; Mon, 11 Jan 2021 16:43:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610412203; cv=none; d=google.com; s=arc-20160816; b=PbAy7QuEKXrSI3H4L8VJlIpygd/69V4bO5iWpcpCUZ4yQTyzUWB4C6vLdY11RT+5VZ aeLOQq5PZ+GPpH750zGMLTrSc5DBW6I4wIusWqwlVjO5znzihJyhYJUwRq6J/ub3z1Bs kS8JvtH549xYJTBCeuK4t/Ivpxw+NU3JudwBXckDf57orIMn+oWUvUxL++AOZL9g26z+ VYANDcAwaUv4YSZe8ZVSnFoIFPYdhwp0W/mWpOPFjOyU3Tsmdrs8Kx2ICiQAsy+kstD/ pQQm3SYJPZRpfXS0V506rvhocpU0LuSJ0RrV5itJNtGG1Czy1ec1zbvKy+grdmZFLMaY UyZg== 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=OE8Ck6Fz6PnIIJhS2pFaP159N05z71BcH03XOcV38i0=; b=N3evRgzcTNGPuz/sYqgfQT3eQ37wWHXn+cmREn6F0r4qgrmzL29UiR0AhIZr1kS/6l +5oGSyS49OHf1TonDVis1017Q1Y1rXzeaWbfGc987JPlrb9REFpZtQhQMZNTGorg8C1/ 3/7JRPE/CDY6u/mG8JJToSZVt61qA1Hzx0/my2WMBdgkygGbYhAbfX12i6c/KjQbK0P6 qAbZSkt/EDt6SmLmYqjX7wEHLA6jR48NNa14wpEg3YjexUJcl/XBpp1F5+aRsXz9VgWY DY9/75AUA/H3VJqknyAzPj7eIAFXJrs/bPEgBlzlTxgvDzx4klPSguCBwOtAGxXzBoiL uZ1w== 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 y15si400627ejp.228.2021.01.11.16.42.59; Mon, 11 Jan 2021 16:43:23 -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; 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 S1727009AbhAKMpG (ORCPT + 99 others); Mon, 11 Jan 2021 07:45:06 -0500 Received: from mail-ot1-f49.google.com ([209.85.210.49]:38442 "EHLO mail-ot1-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726743AbhAKMpG (ORCPT ); Mon, 11 Jan 2021 07:45:06 -0500 Received: by mail-ot1-f49.google.com with SMTP id j20so16733913otq.5; Mon, 11 Jan 2021 04:44:50 -0800 (PST) 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=OE8Ck6Fz6PnIIJhS2pFaP159N05z71BcH03XOcV38i0=; b=rVPuShmh/DWoBdcGQ45LebkT1CKh5afaNe6Dr28TRf2k0X7t4csDh+Jf6fP37H5ZPj VE6aqhe4rogyhBT03DcFo/rLeOW7B7WHT6pcTi0FCBTCAvd/FJk98MzAHJMuGas9vSLu 4b8QB20CaT7LX93ozXMVTODmKoDqbdwHPH/umRxBjGst2CyQdtwaIrl5WRbRCb5Uoh+g IwiAhs5M+Tyuo3am7MxjSxrSD5s5rOnOjMrWAkaT4s17q4f2V3/cRbwikQur50WnHRSf yyRTzYTe31je7lnIOboHHkb7EmX72zqWNjnO5IwIkP62fDO42iftnLqLfmfwA4u11DN4 smSg== X-Gm-Message-State: AOAM531SAxb5khf9F3F5427sL3IsX2X+bNCaEvnFvZDI8OZ4WRMdECZH 7MTOPc8a40x6bknWJ+B3xVbdQq62pAvmfykBhG4= X-Received: by 2002:a9d:745a:: with SMTP id p26mr11109977otk.206.1610369065577; Mon, 11 Jan 2021 04:44:25 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: "Rafael J. Wysocki" Date: Mon, 11 Jan 2021 13:44:09 +0100 Message-ID: Subject: Re: [PATCH 1/2][v2] cpufreq: intel_pstate: Add parameter to get guarantee frequency To: Chen Yu Cc: Srinivas Pandruvada , Len Brown , "Rafael J. Wysocki" , Viresh Kumar , Linux PM , Linux Kernel Mailing List , Zhang Rui , Wendy Wang Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 11, 2021 at 8:40 AM Chen Yu wrote: > > Add input parameter to receive guarantee pstate from intel_pstate_get_hwp_max() > for later use. I'm not a fan of this change, because the new argument will only be needed in one place where intel_pstate_get_hwp_max() and it requires adding redundant local vars and pointless updates elsewhere. Besides, in intel_pstate_get_cpu_pstates() you can do something like this after calling intel_pstate_get_hwp_max(): cpu->pstate.max_pstate = HWP_GUARANTEED_PERF(READ_ONCE(cpu->hwp_cap_cached)); cpu->pstate.max_freq = cpu->pstate.max_pstate * cpu->pstate.scaling;