Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp109984img; Wed, 20 Mar 2019 15:20:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqx5YpUdS6ap0uQTxkjPpPstNBjkTz+A7/CGr5eTHmTl5rFE7n72knrBl+l7Mcbof0FTPhYT X-Received: by 2002:a63:c145:: with SMTP id p5mr324194pgi.248.1553120440512; Wed, 20 Mar 2019 15:20:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553120440; cv=none; d=google.com; s=arc-20160816; b=k3Bu1H7Io/NcumVqkbHpKDTFmNJIk4bBqeupvB0yz2rMpZUuqiKNbV08i6hqI/ROxG ZzLU/GZh3ZjIlxaJHiM0URCAFPDyCvQLkUEq/paM7Bpb5PFzqCw8N5M8mDjSFgG2qnt3 UEAeln7qzY3AycFXwrY6jYsyk9gdWRSJV6Zsaaetp531BNkYKQuU7jCUwTy0U2ZgWjjY 31EnknPsfcKlJaJyW8wBA3MZG9HU18WKN5fmJzUiOshGw/2dRh/AqO8eaUGchjbPYL5A CoBZjnOHyaxJKOsCGFM/c6gBtOYPEOLvDRfXsu6UUtFfMEEGGpcuyOYArS1G7IHpKEil 4ULw== 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=vEjcFnZj4SLhGx6f1FBW+wz7ljQx0oSs/w2Wb6sJnPI=; b=tTXRE4SNhsapBGbU4L5K+Pqc2NZXcZb1+x/TiRS33kTfe6CjEXofUhL6IkXNco1s7K DiwUcujUnxfVWdTLVQD4d4Lku1C2LctZlzT+/E7WwddlkHy6c/NE8gcwqq+RAsUqmiQT nym44XuCchxYC7OL6ocJYlGMh/AAtZIj7b59J3g4dvXs7ukH0BVW7BSZtMQ66H1idXIn irYZiNQ1pVXlNvFJ5EPv7fDgT2bM158aEEktkgZLT41chHtrMNiew6PFRE2OvXw+Fpgx vvy+zIhO1EBW/S7GC1ZxGPCVftXH2QWP09gJQZqJ2T2oam31ayEyPIbj4Qe1SCcRcxlC z9uA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l65si2601658pgl.368.2019.03.20.15.20.23; Wed, 20 Mar 2019 15:20:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727605AbfCTWSP (ORCPT + 99 others); Wed, 20 Mar 2019 18:18:15 -0400 Received: from mail-oi1-f174.google.com ([209.85.167.174]:43294 "EHLO mail-oi1-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727437AbfCTWSP (ORCPT ); Wed, 20 Mar 2019 18:18:15 -0400 Received: by mail-oi1-f174.google.com with SMTP id 67so3136036oif.10; Wed, 20 Mar 2019 15:18:14 -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=vEjcFnZj4SLhGx6f1FBW+wz7ljQx0oSs/w2Wb6sJnPI=; b=mz8kSefCX8reUJW01Jg56obz309/GbBAjJ2IkICK269q3MVicQg+ZZbA/4qHbyDwJk vcItgaDa3ywWhlScnRXUfqBpV43GmxUkeqgCHIvJxFjgqrSbQ6aXBdvsYbgMPymaCbMF vHBYzlzVYQRdU/FpCaUxe7aELkqzTWz8rXimuCR8/M/Eq4K7s8k1yyDniVFYtEHp2Ahg OMsr+mftk2Hhki4Y2swk2Le1YpvyIPAvtpW3EVKMjKEcvN3qda78MhjJ6b5uTeB8y5v1 yt38ZyVnApqqwfrP1Y6obXZyJM49PuxvUzlAUULb+w0VmpbwnIPwf97SP1BpYZ/N/s7x 65qA== X-Gm-Message-State: APjAAAUd/BRT9eeSEuUiQsPj59V9P1Em7kIMrpzvMeeSNFH5aGvz1HOz qYy88BSdP0UPEMPFOEHdKblqiVRBiweFmtJch50= X-Received: by 2002:aca:5c55:: with SMTP id q82mr203636oib.95.1553120294392; Wed, 20 Mar 2019 15:18:14 -0700 (PDT) MIME-Version: 1.0 References: <6369897.qxlu8PgE1t@house> <3100343.nkNWlhakcz@house> <2885751.XIsKOnZRY2@house> In-Reply-To: <2885751.XIsKOnZRY2@house> From: "Rafael J. Wysocki" Date: Wed, 20 Mar 2019 23:18:03 +0100 Message-ID: Subject: Re: [PATCH] [RESEND] Do not modify perf bias performance setting by default at boot To: Thomas Renninger Cc: "Rafael J. Wysocki" , Len Brown , Hannes Reinecke , Linux PM , LKML , Borislav Petkov , Simon Schricker , Srinivas Pandruvada , Len Brown 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, Mar 20, 2019 at 3:17 PM Thomas Renninger wrote: > > Rafael, > > I top post the general things and answer in only a few sentences embedded in > context below: > > I very much honour your work and your neutral opinions and reasoning and > I always have. > > This patch is a resend and while I try to come up with alternative hacks, > there still is no solution, not even a suggestion. I have a patch to rework the EPB handling to avoid the offline/online and suspend/resume issues which I'm going to post shortly. It doesn't change the current behavior on the first CPU bring-up, however, so feel free to adjust it to your needs. > I sent the patch 3 years ago: > https://lkml.org/lkml/2016/2/26/675 > And I found this when doing performance analysis with Mel (Gorman). > > This time Hannes (Reinicke) stumbled over it, while he was working on > performance tests on NVE over fabrics. > > We need this fixed and I am going to repush this into our kernel(s) now. I'd recommend to wait for a while with that. > On Monday, March 18, 2019 11:57:08 PM CET Rafael J. Wysocki wrote: > > On Mon, Mar 18, 2019 at 2:22 PM Thomas Renninger wrote: > > > On Monday, March 18, 2019 12:40:46 PM CET Rafael J. Wysocki wrote: > > > > On Mon, Mar 18, 2019 at 12:15 PM Thomas Renninger wrote: > > > ... > > ... > > > > > > > It may not match every setup perfectly, but at least it > > > > > > is consistent. Why exactly is it worse than whatever the BIOS has > > > > > > set? > > > > > > > > > > Because there may be BIOS settings for the CPU which justify > > > > > initialization > > > > > of the Perf BIAS value by BIOS. > > > > > > > > Well, the EPB is there for users to set it via the OS. The BIOS > > > > setting is not guaranteed to work for all users anyway. > > > > > > Who says that? > > > > I do. > > And this is the reason you do not see much patches from myself anymore over > the last years. > It's certainly not your fault. I had quite some discussions with Len about > specification and BIOS breakages. > > Especially in the CPU powersave area, idle states and cpufreq drivers, Intel > was doing it differently all time long the last 5 years. Ignoring their own > specifications, ignoring possible BIOS settings and changing kernel and > userspace interfaces all the time. It looks like you are generally frustrated and hopefully this isn't my fault. I would like you to be more specific, though. > And now I have the discussion again... What discussion? > While it is related to this patch, it gets off topic. > I guess there should be a more general thread on lkml: > "Do not change APIs every second day" > Up to userspace, but also to BIOS. I have no idea what you mean here, sorry. > > And then we can get back to the initial setting discussion. > > Let's stick to this topic in this thread. > There is no reason to not find a proper fix for this meanwhile. > > Overriding the BIOS setting should IMO only take place: > - if lifetime of CPU could be affected as you mentioned. But in this case the > affected CPUs should be matched > - if we expect that there are BIOSes which "want to set this value to 6, > but may have forgotten to do so", as mentioned in the original patch > from Len. BIOSes where this is the case should get a quirk to set it to 6. On all of the laptops in my office where EPB is present the initial value of it is 0 and I don't honestly think that this is really intentional. It looks to me like they don't initialize the EPB at all, which unfortunately is hard to distinguish from an intentional 'performance' setting. > > Still, ideally the whole overriding and the message should vanish IMO. We may consider doing that, but let's fix clear bugs first. > Last time I sent this patch your answer was: > "I need to talk to Len about that," > https://lkml.org/lkml/2016/3/4/371 > > But as this is x86 kernel core code, I guess this should be discussed and > pushed by the general x86 maintainers anyway. Sigh.