Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp3371722img; Mon, 25 Mar 2019 08:59:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqx2FBiXydJvLS95oZ3a4Bm+vcG7epAbCaP5ajlRnDw5yMkWhL0JcdhNEVzggFSKWBNAnOSG X-Received: by 2002:aa7:928d:: with SMTP id j13mr25194703pfa.112.1553529579023; Mon, 25 Mar 2019 08:59:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553529579; cv=none; d=google.com; s=arc-20160816; b=TEgOAYyO5dxUfKqfSRxLPvYYukosRciozYsuy2d5zcv+FVP6tVqfi3xRzjzeRzYjHP ulgxnf/V+tZ3fnVq2TbiZkBJfJuL0D7NK4FnZaOKxpHDCMhwvC7aHP9a+0YAJCdy2jZ4 n59+UBVYU4jMgFH7B14/00SuFZZ+NUkMI3gN7k+ouuxCyZ2hfDYOBt4vZ76s+ppdkQ57 SAk1e1UPQmqwK1QAMrmX5ZadYT63p2+0TjpS6Lhep3S1/qJRe70T3yRZHi/fYC7UcubL AtjsjpBCpG7d5C3hHO+6t0P2rmYmNfTK4OVGCvPhGdeker1fSfQ58DF0A/P9NgMo3+6y IJvw== 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; bh=4INuxkvys5kxpts4OeItYqttwhUeELh83LHrgJaurI0=; b=WPcw1yX5/RDAYugHykaDjaUYBw70qZYBSEA6hkNxeqD89svEx5m6vi0n1VGQJhY50+ XyEqjPlhQ1T4xy0RN5W+Dm5zyMi/OFXT9DxA5FadVR1q6angg3WO14XRggJPAdhhuOp3 9XjgXKlTIZbLvyBabIoEoB7yGI/kco4zERcLklY15v+KEvgDRCCXZFETt09VZFSjjwag ZP7UBwmu9+osqrARQjJatJwn+MOIf7wWOXrboLdncXUYt+0drrwG6/U/PTF+tsAApQ1M EqERjTdgzCBDo7MmmjaMvZ58oHdAaXLvfGjVs6ubYR/wexUlLfRpLRIXT/3h8Kig6Udz 5Kqg== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d2si14569299pls.325.2019.03.25.08.59.24; Mon, 25 Mar 2019 08:59:39 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729529AbfCYP62 (ORCPT + 99 others); Mon, 25 Mar 2019 11:58:28 -0400 Received: from mga01.intel.com ([192.55.52.88]:14030 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725788AbfCYP62 (ORCPT ); Mon, 25 Mar 2019 11:58:28 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Mar 2019 08:58:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,269,1549958400"; d="scan'208";a="125713860" Received: from tassilo.jf.intel.com (HELO tassilo.localdomain) ([10.7.201.137]) by orsmga007.jf.intel.com with ESMTP; 25 Mar 2019 08:58:27 -0700 Received: by tassilo.localdomain (Postfix, from userid 1000) id 81404301C16; Mon, 25 Mar 2019 08:58:27 -0700 (PDT) Date: Mon, 25 Mar 2019 08:58:27 -0700 From: Andi Kleen To: Peter Zijlstra Cc: Like Xu , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, like.xu@intel.com, wei.w.wang@intel.com, Kan Liang , Ingo Molnar , Paolo Bonzini , Thomas Gleixner Subject: Re: [RFC] [PATCH v2 0/5] Intel Virtual PMU Optimization Message-ID: <20190325155827.GI18020@tassilo.jf.intel.com> References: <1553350688-39627-1-git-send-email-like.xu@linux.intel.com> <20190323172800.GD6058@hirez.programming.kicks-ass.net> <28851e9d-5ed4-8ce1-8ff4-9d6c04180388@linux.intel.com> <20190325071924.GE6058@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190325071924.GE6058@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > It isn't going anywhere anyway, its insane. You let perf do all its > normal things and then discard the results by avoiding the wrmsr. > > Then you fudge a second wrmsr path somewhere. > > Please, just make the existing event dtrt. I still think the right way is to force an event to a counter from an internal field. And then set that field from KVM. This is quite straight forward to do in the event scheduler. I did it for some experimential PEBS virtualization patches which require the same because they have to expose the counter indexes inside the PEBS record to the guest. -Andi