Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp1084423pxb; Wed, 16 Feb 2022 10:35:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJx/qRe6rQc0ryR/B7QKHnd5BZ0KtX+OhooVfFrxOLb6BpSTE/irvfqcjBLBcRGbQjsogC94 X-Received: by 2002:a17:906:9489:b0:6ce:f3a9:2c17 with SMTP id t9-20020a170906948900b006cef3a92c17mr3413457ejx.333.1645036537471; Wed, 16 Feb 2022 10:35:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645036537; cv=none; d=google.com; s=arc-20160816; b=a+bzcz+QmpE/OTZurg0xG59tcml0gAEtSlqIzYXEsX/MChrXTz9uxKrEiiRIYpo2HB HES6D5EN4KePztMatzD66z+KZ5YQqA1nLo17g1XAkYR3s/P2TxbhJ4pdiiibmpJw8Lwk oJjKXMouxpsHTd3Q2jyDCvI+38lerMrCCH29Y9uwdG+Ng4nhxEO0VW40xXTN+ifFY7El Um+r/KnnUV7Ach8g7TVPJMLXRAbT9zv0tr9VkkSDGQ2O5l7EMFZ5CNHe2Jqe3HtrMTQS AyWg95HHyQaNxpjqDjIJ14GblXx9aKY++1r6iGjwKRO3ZcuXuXSKzPhgWuU5YOukvG3f B3Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=zVC5cj0z6rMQpOyPOmFfrF76NsP0MR7V60Bxrd230h8=; b=vD1U/9/EziUoUGKTl6kJHV/3acBm6Y/pS07nxYNWmU6S5sUy+4QpkLFwKeV0JH+aa5 yonGKvfpoZQlC/kN5I2ypiuOfjBE4yI9esMn8auT5veflHgoD2sk+P6ZcH+huRAJ7d4j L6zwkQvDGwZ8k3nDYRJPgndvEsUNg3xpkZuM45iW9PkpwfTQEUSWTfkXvL7kZKlRrZ2X uCDnyirNSTIjCCI4QNqXAfOW5xnmO73188KU+LGhMChn4gm/NGMhVqDHmOzeU1tig9H4 Oj0Jo4aqttX9UM4Nclxg0dIJsbRmRUD7qVSJGAk8v2B6wY3PJGSWyFMSJfvjLj1pVmc0 Jqhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=q8IQlHrC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jg14si368672ejc.999.2022.02.16.10.35.13; Wed, 16 Feb 2022 10:35:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=q8IQlHrC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237451AbiBPSKb (ORCPT + 99 others); Wed, 16 Feb 2022 13:10:31 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:49534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237442AbiBPSKa (ORCPT ); Wed, 16 Feb 2022 13:10:30 -0500 Received: from mail-oo1-xc2e.google.com (mail-oo1-xc2e.google.com [IPv6:2607:f8b0:4864:20::c2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C7BA2A4A2C for ; Wed, 16 Feb 2022 10:10:17 -0800 (PST) Received: by mail-oo1-xc2e.google.com with SMTP id w10-20020a4ae08a000000b0031bdf7a6d76so1664633oos.10 for ; Wed, 16 Feb 2022 10:10:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zVC5cj0z6rMQpOyPOmFfrF76NsP0MR7V60Bxrd230h8=; b=q8IQlHrCXptsSphCoGIR7Lz/Qw8ySxmbDGAVRO4mPP3/HsDpbPi0dH6R3rZYb7CTbj ou7qsm3xMtjsRpCI7hDfZe5dyYBshj3mDeWQC7MGXKrucSIYTX76I/w6j9ZQoglE3qxn gGBRb9lbvPw3ptllWGR3TWspruFJMRtoFGJ/U0db7bpKlTWzSez5629Z3SueBg9xkBMJ +GtzU0/ZCH0ySgTz3rqladIHD+XSurzIcGCEmkvvsTVYnbieK23gTzKm6ccFvlyYnoiR CHg3CgJHqqg/TT5WbA3KtwepYNaqP3kJN84qNyLMIe8KnoTBReIZInqK3NGQm+bbHuW7 Y3wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zVC5cj0z6rMQpOyPOmFfrF76NsP0MR7V60Bxrd230h8=; b=AnaF/6Uj0oivIrNPZNMSVPA3K4vlmqz493P5oq35B0p3s0FR1dpQ0R1HZwfmNAQShh CTpryBrGBa4f0nfnVphGjvvofqFobKuHcFCRGwjprRTVw7zyHl6j3EN7udKyfeNKUTIq iNmZhqMWn9WnEDJPAIMR40u7LFnA/xGFTVYyJAIqOXBEaLYtEQk7eS2pn9PhhkOo1hxU pRKEt57ShwLEsXpLu4CKPHYNhnCZaNhHhCu+0c8sxFwRVGcpTy4ztTaX27hinmh0tjUA XkFy94GBxfd7cUNljrD2UOZoU1xQiNwH8VUQ1BMOsL/ZOowX9N8hxsjpb5ovFMgqwBZz WVUQ== X-Gm-Message-State: AOAM53020Ik2ioyb/JOurUTmoVSoWCO7zv6DwKh4WrxJIfiTfjMp0Gjo 5Z5OcLv2VelFfV+8ttQuPIFp1Ub6VbWjFEELvYI5+A== X-Received: by 2002:a4a:5596:0:b0:2dd:bb93:8800 with SMTP id e144-20020a4a5596000000b002ddbb938800mr1290780oob.85.1645035016433; Wed, 16 Feb 2022 10:10:16 -0800 (PST) MIME-Version: 1.0 References: <20220117085307.93030-1-likexu@tencent.com> <67a731dd-53ba-0eb8-377f-9707e5c9be1b@intel.com> <7b5012d8-6ae1-7cde-a381-e82685dfed4f@linux.intel.com> <6afcec02-fb44-7b72-e527-6517a94855d4@linux.intel.com> <2180ea93-5f05-b1c1-7253-e3707da29f8c@linux.intel.com> <8d9149b5-e56f-b397-1527-9f21a26ad95b@linux.intel.com> <31cd6e81-fd74-daa1-8518-8a8dfc6174d0@gmail.com> In-Reply-To: <31cd6e81-fd74-daa1-8518-8a8dfc6174d0@gmail.com> From: Jim Mattson Date: Wed, 16 Feb 2022 10:10:05 -0800 Message-ID: Subject: Re: [PATCH kvm/queue v2 2/3] perf: x86/core: Add interface to query perfmon_event_map[] directly To: Like Xu Cc: "Liang, Kan" , David Dunn , Dave Hansen , Peter Zijlstra , Paolo Bonzini , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Like Xu , Stephane Eranian Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 15, 2022 at 11:36 PM Like Xu wrote: > Hardware resources will always be limited (the good news is that > the number of counters will increase in the future), and when we have > a common need for the same hardware, we should prioritize overall > fairness over a GUEST-first strategy. The bad news about the new counters on Intel is that they are less capable than the existing counters. SInce there is no bitmask for GP counters in CPUID.0AH, if you give 4 counters to the guest, then the host is stuck using the less capable counters. Overall fairness is definitely not what we want. See the other thread, which has a proposal for a more configurable perf subsystem that should meet your needs as well as ours. Can we move all of this discussion to the other thread, BTW?