Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3854400ybl; Mon, 13 Jan 2020 03:53:47 -0800 (PST) X-Google-Smtp-Source: APXvYqxx3bo3QVK5JeNlC3IudunDMQ5x7POi0ik+SwRMAoM+ElUPTAKyrvmhHet8ki31NQ8eJ0X/ X-Received: by 2002:a9d:6f8f:: with SMTP id h15mr12037796otq.1.1578916427185; Mon, 13 Jan 2020 03:53:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578916427; cv=none; d=google.com; s=arc-20160816; b=FgMsBhA1UARSzQEKRGFz0UFDsdLCmj0iTJdqVuOKrCvCwlyuu3o0L4dttbMQPmjyfr pd6F8XnxXfYcldzYohwsqLnbBwhxW10vfI9sYKXvOMMAnjoW6j3mpN1KSsvuLKgZV2jf U0P400o91En5o1cBv+b5byRCNfd3v/+94k3+m+1GbEs3Cuqa9g8nGsnEu/26pzXvDyhN BivQf7RtyargpHp5uoyY2DelecTXVNz7hrjA/p5yUWRSxCun73DH6SkW8o8n6AuB6ON9 UGw6ukm40VAaSa+fXjGNku8lPJvZpa3XPD/nDcj1rIu15G6ZtTKEOQPXI9o0DLqaugQf QRuA== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=fAtNK55yDbPKiBZA6iN0qoeGlR4L/c8UwxpFGcssRLE=; b=O8J/c3wRk/z3tuQBPGMwxILSeC4Y85/TL4d8R8hZA3NgQfBTgxv6OFp/4CgA2bVjmX /PGYxpkSJo21jkQghEjsUo6maaquVUkHgCR3PMMNJPh7VtDzYlip5eWffNVdx3WFEqvM wB8zHex8FiRun/uuRWv50OBG9d/+j/0z5M3DxOYQ88EteLqhI4CXz3i3hbl/d58xxJt3 x8w7J69NQ0ZGI1g0bn6i26fVtc4JCLcUh3eXrxXMbENncggSDmI6PHvlQQ5lvRyl+YjR ijPKqUIjYIeXZO6p3CXhuTRF222t0o1cH04YrgwINYty5FdgTU15cv30bajx3FccEkjJ YtHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=aipeRjry; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n1si5599907oic.225.2020.01.13.03.53.34; Mon, 13 Jan 2020 03:53:47 -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=pass header.i=@redhat.com header.s=mimecast20190719 header.b=aipeRjry; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727494AbgAMLw0 (ORCPT + 99 others); Mon, 13 Jan 2020 06:52:26 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:59054 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726277AbgAMLwZ (ORCPT ); Mon, 13 Jan 2020 06:52:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578916344; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fAtNK55yDbPKiBZA6iN0qoeGlR4L/c8UwxpFGcssRLE=; b=aipeRjryfBMmGleaYvMbHJvX6rDx9O9kS3uaof9h7WUSBxk2Sug4DG1MCa+apXY+0HoKTN ggQhUylnEckjzmrAs45rB1edEcocRd4zwe64W10Ja0sZKbJ5xJESr61YNFuV8evG9uMDXc 0pjcZx9hncH848iXqXH057ehEbfYfSU= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-119-f4ukGw7qPliXvxk4auhKVg-1; Mon, 13 Jan 2020 06:52:21 -0500 X-MC-Unique: f4ukGw7qPliXvxk4auhKVg-1 Received: by mail-wr1-f72.google.com with SMTP id v17so4860169wrm.17 for ; Mon, 13 Jan 2020 03:52:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=fAtNK55yDbPKiBZA6iN0qoeGlR4L/c8UwxpFGcssRLE=; b=l6M+mI2L2yfOHfsY/u9oEZznR3RwwFg7R7lAqwjupb1V+iIcW+ZM45VfiOjwjyyUUo 38ti/GmeOGlzsxv/MstNobnC4ICSO2MtTws7KOX6dN1k6vhilPAwS+HRCW4TCciBssZN 8ZFSzj8fFql0K9aIEeOjvC9hV/Cr5x1n1stHnG/+wH9DSSBV9yahcG4dluai0bIr+Z/B wG3pjk1tf9RyMBp0a6PjMsVpEacVR6cySiaOIXqCytq7nvAWC3DUIsUZdiDYzY8OgUTM MuMRnKSYIohAF8C5sZpM5v7yMVK0xc0hFuTMFO3JffvgJptL6G2Li7XTHRL0uU3r90kf Eh9g== X-Gm-Message-State: APjAAAVe3dXZl4CkLWm6h8fV3xCKLqX0MCmJfEFskD/PC+U9wwNtT0+e nsKFHCalbY6QuwCQJBFZTVn5ACe1rbSezBZF8LCBD7u51ca9dUwE6HnFqAqHrG7g12gfMyEiR07 R5K59nnI6IzmyMXU2pgFA3n6R X-Received: by 2002:a1c:7f4f:: with SMTP id a76mr20060479wmd.77.1578916340370; Mon, 13 Jan 2020 03:52:20 -0800 (PST) X-Received: by 2002:a1c:7f4f:: with SMTP id a76mr20060454wmd.77.1578916340124; Mon, 13 Jan 2020 03:52:20 -0800 (PST) Received: from ?IPv6:2001:b07:6468:f312:1475:5c37:e2e2:68ea? ([2001:b07:6468:f312:1475:5c37:e2e2:68ea]) by smtp.gmail.com with ESMTPSA id u24sm14250566wml.10.2020.01.13.03.52.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 13 Jan 2020 03:52:19 -0800 (PST) Subject: Re: [PATCH RFC] sched/fair: Penalty the cfs task which executes mwait/hlt To: Peter Zijlstra , Wanpeng Li Cc: 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, rjw@rjwysocki.net References: <1578448201-28218-1-git-send-email-wanpengli@tencent.com> <20200108155040.GB2827@hirez.programming.kicks-ass.net> <00d884a7-d463-74b4-82cf-9deb0aa70971@redhat.com> <20200113104314.GU2844@hirez.programming.kicks-ass.net> From: Paolo Bonzini Message-ID: Date: Mon, 13 Jan 2020 12:52:20 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 MIME-Version: 1.0 In-Reply-To: <20200113104314.GU2844@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13/01/20 11:43, Peter Zijlstra wrote: > So the very first thing we need to get sorted is that MPERF/TSC ratio > thing. TurboStat does it, but has 'funny' hacks on like: > > b2b34dfe4d9a ("tools/power turbostat: KNL workaround for %Busy and Avg_MHz") > > and I imagine that there's going to be more exceptions there. You're > basically going to have to get both Intel and AMD to commit to this. > > IFF we can get concensus on MPERF/TSC, then yes, that is a reasonable > way to detect a VCPU being idle I suppose. I've added a bunch of people > who seem to know about this. > > Anyone, what will it take to get MPERF/TSC 'working' ? Do we really need MPERF/TSC for this use case, or can we just track APERF as well and do MPERF/APERF to compute the "non-idle" time? Paolo