Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp803394pxa; Wed, 5 Aug 2020 13:10:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyIGohbd10pisbd0i2cfXRuruBmPNn0GZl9OD5saVD0/GIvHaUYokQsrMKVB/jHszMRruIJ X-Received: by 2002:a17:906:f202:: with SMTP id gt2mr1028685ejb.70.1596658226817; Wed, 05 Aug 2020 13:10:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596658226; cv=none; d=google.com; s=arc-20160816; b=nJSo7CHpuouVLDWwzLKO0zUHRo8TU3zPGtChzHldAqNRmtr20c50urKNsSIZUIwz3q U37DUU3qY/HJUQHiZ6ZLFNz+RyTSP79hfoBCTkRNPQFyjyD3cZFQz4WQXNmcwq3ckEw5 9OjrZcVx4Xtzgd+yXXgQ9OxM+n71cuEDSzulrTVTXGeqCxBTs0xkYydaUw3oPenThRmZ Rs7pRrspbC7NE9i4Y6t9fDaWN1K6uuSZ92kHDLXHAdHeadx0j08ZS3w83zZ4y7jiGXfv DdJXb373fLNvvezzAVq4QlhSjV0IS0/qJ3VK8CJw/a8YtEB9llw7rvVD5u3SBwl8pSXF DzDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=B2Pl0nxbT6UouzIoo2qIhPoj7Bo+fxndZdi1tAY/F2o=; b=iYF12v/9bPU0k38sokRvD42AWJ2O0D6I7m3M+5pAFApvziIc51WyIHovd68VEEvE5H Im/7EX3MiyaArJP6jx2j0MwhrQ5KgiK3ELmHV2WB4lvhdoyTfT6Qs4qKoOK6zqcpx+5P 1g8a3Cc3GPJnU/ie8Vj85f6zmMDz5ND6tduTG0hB35gAy6M/LmKuRcrmJjyc39pOMOsS +gYq6t2+fHFpnBYndNysq2CPuj/xk/68iGgAvvV1vPQc/Mr4yC5IHIIaIB7x4fsotolA JISbPLkBuPLab9Nnsp8nkZKPKJ9ed5IZdMu6mDpc1rQ8N1t6php6wTMznxXuUCf8awf/ 5EJg== 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 w6si1816695edv.360.2020.08.05.13.10.04; Wed, 05 Aug 2020 13:10:26 -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 S1729630AbgHEUJz (ORCPT + 99 others); Wed, 5 Aug 2020 16:09:55 -0400 Received: from mail-ot1-f66.google.com ([209.85.210.66]:43608 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726799AbgHEQ3G (ORCPT ); Wed, 5 Aug 2020 12:29:06 -0400 Received: by mail-ot1-f66.google.com with SMTP id r21so23270791ota.10; Wed, 05 Aug 2020 09:29:05 -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=B2Pl0nxbT6UouzIoo2qIhPoj7Bo+fxndZdi1tAY/F2o=; b=evdsFFTQx9K0IFg7PgdGrbOMSQEld9thfsrPXZJwH03tBm4zYVMNRf8kfpDrR0SMOz Vp7hWNLLeib3bZ3y0RIn2y/6d3gwAOjLEDi5yFK8xPGIq2Y74SwikqT+fTf+opgWTsCZ STEYf16frTl1sHxqC4oKPcrVK0yriSLj1CxzH2cRi4CSnqqlzXvEdr1eoT9eXKmzRlC/ fvd9DZRrUCg2lvR7E9dEijgr6nyAb5QyT/ZS1mi7cxWbDUL7KWI2Oz8+69YxKExWj9G1 VZi8DrBhik2E6mgTA5KVttslVkNaA9KB2+LSBPEbnxQ38DYPidC4xTFH2yJj5GSCYOmC QMOA== X-Gm-Message-State: AOAM530e/iFMFhMeEY/MoXMYd6YMmTv1k65lG9OCj4B14GpK3rtaydLz QWGHHOuOc/O/3RhDn3T6MJGmkpJzCRXOjYDBDaE= X-Received: by 2002:a05:6830:1c74:: with SMTP id s20mr3262615otg.167.1596644944989; Wed, 05 Aug 2020 09:29:04 -0700 (PDT) MIME-Version: 1.0 References: <4981405.3kqTVLv5tO@kreacher> <1709487.Bxjb1zNRZM@kreacher> <1633168.eVXp6ieOpF@kreacher> <000d01d66a81$59326a50$0b973ef0$@net> In-Reply-To: From: "Rafael J. Wysocki" Date: Wed, 5 Aug 2020 18:28:51 +0200 Message-ID: Subject: Re: [PATCH v6] cpufreq: intel_pstate: Implement passive mode with HWP enabled To: Srinivas Pandruvada Cc: "Rafael J. Wysocki" , Doug Smythies , "Rafael J. Wysocki" , Linux Documentation , LKML , Peter Zijlstra , Giovanni Gherdovich , Francisco Jerez , Viresh Kumar , Linux PM Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 5, 2020 at 5:38 PM Srinivas Pandruvada wrote: > > On Wed, 2020-08-05 at 11:34 +0200, Rafael J. Wysocki wrote: > > Hi Doug, > > > > On Tue, Aug 4, 2020 at 7:07 PM Doug Smythies > > wrote: > > > Hi Rafael, > > > > > > > [...] > > > Note that the active mode performance scaling algorithm (which is not > > the same as the performance cpufreq governor) sets the EPP to 0 for > > all of the CPUs that it is used with and the driver sets the EPP to > > 255 in ->stop_cpu. > > > > That last bit is questionable, but that's the active mode behavior > > which is not changed by the $subject patch. > You need to set the CPU which is going offline to the lowest perf > settings. If not its sibling's performance can never be lowered than > offlined CPUs max/min/epp. OK, fair enough. I'm not going to make this change after all then. :-) This behavior is really confusing, though, because if you change the status from "active" to "passive" or the other way around, the EPP goes to 0xFF on all CPUs and cannot be restored. To fix this, we need an extra patch on top of the $subject one to introduce ->online and ->offline callbacks so that ->offline sets the EPP to 0xFF and either ->online or ->exit can restore it to the previous setting. Cheers!