Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3891189ybl; Mon, 13 Jan 2020 04:31:41 -0800 (PST) X-Google-Smtp-Source: APXvYqztjpbLyOSFV6ScWhhN4L6YGe1gXc1B8SkE4+f3sJXQwKwyxu666HUVHwoJjOnymqHLLv+/ X-Received: by 2002:aca:c0c5:: with SMTP id q188mr11708527oif.169.1578918701536; Mon, 13 Jan 2020 04:31:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578918701; cv=none; d=google.com; s=arc-20160816; b=Q3cssxJClTUWY6JnhqDxOPLDvwT8z7l4K6NUyp5P5QEfEoyHJRseY+iKSoqLbaZv5k Gpz6pcBW9JbwHr5hVBbbjASor19ODw6dLqIRPiZfyPjm3ET7afI6sQXRINg2jWVrCWmR xFLB9H7aoKZHqc6K42azNqn5PH9uIezfnRlnIdP07DMc2sJ3UnNyUZv75cDDHwgr044m Alf0oWPyht6BfXDRjXo5WShbyWHpYpeatthMQ66RgaB9YTG4n+DM/gc0bcJ6aXk0QlWy DJb3C4qp6JH21OTGgj/JM9MpvO15ldHL6ikc7pnseg/VBvweFt7JlJDi18kU3iCVzA/5 t1ZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=N53AG3XTz7zK190T6CmIQkpQjxVcmnf8umqcp8Tjl/8=; b=FWH+6Ra8b0c5ZiYnG8Unuxqzycn8K8fF0XpeRK5HbVH5fQGOy+ruf87/RglpVjcJ5l WwZ7pLU/Pc66pe2GV2BeKrUF52srBelN0cNjx8H52bh1oUbBKc/pJTlSX7XkXPHISIm1 bL+SoEX6tsnUTTb9SGI1Nfdab6qWUqxNhXWkMQVPWi/N3jsKI5rDljuiwO9Yb6lNG5cr X2ReGiIilivfNXN/xTa8lGbWAIAJlNhcMaOef5kLZdI8gNLxei5XUfIyxf7r5G8t/7J7 Ioju0B06BdCKfkDjvNgkNAY1TlssKWgb+q2NihHOhCRn89sYI7Zrmgw0xUiyDXrtm1Ym Npiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=WB+sBzmL; 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 e22si6476696oiy.124.2020.01.13.04.31.28; Mon, 13 Jan 2020 04:31:41 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=WB+sBzmL; 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 S1728731AbgAMM3Y (ORCPT + 99 others); Mon, 13 Jan 2020 07:29:24 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:52566 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726976AbgAMM3Y (ORCPT ); Mon, 13 Jan 2020 07:29:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=N53AG3XTz7zK190T6CmIQkpQjxVcmnf8umqcp8Tjl/8=; b=WB+sBzmLjVVyxPITxtXXdsdz+ ci2VYBEB+A3+wGfdN22XHBoKEeD3OIT55Hk0+PNIqMryFVbs0qmcAtD/4PRNE7EEgNDyYepx2EquG wt6p5n3T4In63koDZb7usu4m0isU+nZ4ZpGL9AzYpOiF2mZPfiNu0UdG3rw48+aUm9L6sgNTx/lG1 m6+YSF+/Mi8fIJck2LXHkvaDZ0KbEZg6UzcKrYWDnJ0YkqyBIfDUj2iEjwVKzj61B1/t9TaJ8Od5f k2UM7ZgeSGM+3/2g+J+NgNn+LDD55G0PZR/f/cnJmUm+Fjjs3Dm99GgjWfGA4YMfK3fTUK9hY6l6B hCYKnlufg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1iqyqI-0003Y5-4Z; Mon, 13 Jan 2020 12:29:14 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id CB341304123; Mon, 13 Jan 2020 13:27:35 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 24A9B2B6B2F92; Mon, 13 Jan 2020 13:29:11 +0100 (CET) Date: Mon, 13 Jan 2020 13:29:11 +0100 From: Peter Zijlstra To: "Rafael J. Wysocki" 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 Message-ID: <20200113122911.GE2827@hirez.programming.kicks-ass.net> References: <1578448201-28218-1-git-send-email-wanpengli@tencent.com> <20200113104314.GU2844@hirez.programming.kicks-ass.net> <2579281.NS3xOKR7ft@kreacher> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2579281.NS3xOKR7ft@kreacher> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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?