Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5768812ybl; Tue, 14 Jan 2020 14:47:36 -0800 (PST) X-Google-Smtp-Source: APXvYqzcWAHJ9W3VUaBdmdFsG7kIj3JafccquReXISXWcnMRT+cyjWQOZ7ebC/vw+6bj6SnOE+Jm X-Received: by 2002:a9d:4e99:: with SMTP id v25mr543084otk.363.1579042056332; Tue, 14 Jan 2020 14:47:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579042056; cv=none; d=google.com; s=arc-20160816; b=aNZAvWeN51dKybhEnkXFHAH61Uhu28y7QxGQo74pXI+WbTaeDfBLvA6tFl4aot7kOB J+6KOAjoum6hCWgB0lXA5hnIOBNyJ/0cgeyPR7ALLhlJMjEAObyvqnXJbx4Ov1odWD/o GvqDoV6/QqrXudWk28fYe7/4SOZwgqIO6dd/RF7bbBZYLgowdZ0yw3OPzHwIwCkQ1oMC EQt9NkghjSD1+y/hsyrwR7Zo22npiizm+wA3ON++mTd8YHCGqOmzFEnlM+fHZomHvBCh wuwbq1YCOqQA1hu5E9iKG79d6Ya7i+Kc4UvwQAPJHljUPw5BvtT6Nb/X/atM/5wMytfp jNyw== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=1DY6AediuJseFhMtuP6mcCllQM34We6oySd/ocdR9iE=; b=NE+fThXG3H1WfAehGzh8unJh1aCy4X6jlquVkHl9PTkY6euzUcTKOk3SgTH3x6BS+e q1bZAbB6rXyn/DYHNv8SlQaSno+pmbTsi8X9C7SAZvAwbKKND3UYDk+pjbu3L83DXb0j lOk0biTui/QiFsWoQ5AmVPUsokR//qq4GAJ0geiprnHIlzE4EovFWxDoR1S2V+LRYP1t fwtGt16AMDmxcHksv7NzzUmGcijipUMl63zsaZYChXchGkRf8XbQ1bR0GZh+2KkW5HUu 2tJADnh0GYYFm6wlKAAHpBm0XtXqWVJxCPICUsGJNtqZl/H4Atozg8b/dVPG/V5QbLu0 /U7g== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i6si9382712otp.5.2020.01.14.14.47.23; Tue, 14 Jan 2020 14:47:36 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728795AbgANWqV (ORCPT + 99 others); Tue, 14 Jan 2020 17:46:21 -0500 Received: from cloudserver094114.home.pl ([79.96.170.134]:42652 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727073AbgANWqU (ORCPT ); Tue, 14 Jan 2020 17:46:20 -0500 Received: from 79.184.255.90.ipv4.supernova.orange.pl (79.184.255.90) (HELO kreacher.localnet) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83.320) id 83a96a032f232429; Tue, 14 Jan 2020 23:46:18 +0100 From: "Rafael J. Wysocki" To: Peter Zijlstra Cc: Wanpeng Li , Paolo Bonzini , LKML , kvm , Thomas Gleixner , Marcelo Tosatti , Konrad Rzeszutek Wilk , KarimAllah , Vincent Guittot , Ingo Molnar , Ankur Arora , christopher.s.hall@intel.com, hubert.chrzaniuk@intel.com, len.brown@intel.com, thomas.lendacky@amd.com Subject: Re: [PATCH RFC] sched/fair: Penalty the cfs task which executes mwait/hlt Date: Tue, 14 Jan 2020 23:46:18 +0100 Message-ID: <1868711.0LYWRWiNKV@kreacher> In-Reply-To: <20200113122911.GE2827@hirez.programming.kicks-ass.net> References: <1578448201-28218-1-git-send-email-wanpengli@tencent.com> <2579281.NS3xOKR7ft@kreacher> <20200113122911.GE2827@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday, January 13, 2020 1:29:11 PM CET Peter Zijlstra wrote: > On Mon, Jan 13, 2020 at 12:18:46PM +0100, Rafael J. Wysocki wrote: > > On Monday, January 13, 2020 11:43:14 AM CET Peter Zijlstra wrote: > > > > Anyone, what will it take to get MPERF/TSC 'working' ? > > > > The same thing that intel_pstate does. > > But intel_pstate cheats, it has a FMS listing and possible 'interesting' > chips are excluded. For instance, Core2 has APERF/MPERF, but > intel_pstate does not support Core2. > > Simlarly, intel_pstate does (obviously) not support AMD chips, even tho > those have APERF/MPERF. > > Although I suppose Core2 doesn't have VMX and is therefore less > interesting, but then we'd need to gate the logic with something like: > > static_cpu_has(X86_FEATURE_APERFMPERF) && > (static_cpu_has(X86_FEATURE_VMX) || static_cpu_has(X86_FEATURE_SVM) > > > Generally speaking, it shifts the mperf values by a number of positions > > depending on the CPU model, but that is 1 except for KNL. > > > > See get_target_pstate(). > > I'm going to go out on a limb and guess that's the same KNL hack as > TurboStat has. > > Is that really the only known case? I'm not aware of any other at least as far as Intel chips go.