Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2691470ybc; Wed, 13 Nov 2019 19:52:58 -0800 (PST) X-Google-Smtp-Source: APXvYqx3MEnkOEICYqol8cBg3fkjqIyboe1eyGm/eleCdUzlXxmYvGhX8cCmd4etSuVkRhfnIWRT X-Received: by 2002:a50:ff19:: with SMTP id a25mr7592382edu.181.1573703578544; Wed, 13 Nov 2019 19:52:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573703578; cv=none; d=google.com; s=arc-20160816; b=zKSgB5r9xUivT+t2C4IqntNfsy/UGtDZwcCSaJDcZ3nrZnQXpAP5S5VSAfhIoIwFHZ frLAwL3fUthTb5TSOMRIufIWyF5fokgJQExgR8KSYP0IkwuHEciDrm+qwoRzUSFwXjaR WGIfopvdFbOmG9HmSTv1OYVLCTSD1QFIZkAbr0TY6h+3ToZjcQBoh+TTQZHwv0TqsiLb l6uSOm1DDjjG2KE4dcIyZu2g/IkaJSQzixgOX0OwBRo7bT5NqiBkiqv15u8Qb21Rv2EN p92LWXiBQChceCK9cg+eOrI9ogYuVvjHI6UFk4LM8P7MUqWnEwyMPGzViiZFz3Tj4nzH AM/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=oTNGunsWbSvt43YXzCeF3NH4k2942fdpf8D5q79SgVU=; b=Ub132XdsjeQDpKX8Ynbv9bOUos3jUdsHqBPzyYznFOB/eUCudpcYLR4mkEG5AomIwB 00rtQRcKQ59Op4rFz7wfDoRSLbmpe2CsRexf7n9DG3P3elob6fgzy60h/hfGU6UGBLlQ htkTH6nUrEpTj0StY8MbnEvkgfDfdbNyw0MmRBO7eBt/FxDtXZql2UrJFWCmrDbkR/vW WdRrkvWR6gJIkbUMrFK9CA1hx+LPvAAkCVLSD+3uaXW6NJEXNT8FMy3LvZzlmTC2nBX2 wrwVhdPmugrK2BCjhY4bOL/xGOCHDnzyyXEclh/WONRid7RBJ6jv3R8jPNQALolyTQP3 uuKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=O5PrQ1HO; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c9si2901047edy.72.2019.11.13.19.52.34; Wed, 13 Nov 2019 19:52:58 -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=@gmail.com header.s=20161025 header.b=O5PrQ1HO; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726755AbfKNDvW (ORCPT + 99 others); Wed, 13 Nov 2019 22:51:22 -0500 Received: from mail-oi1-f194.google.com ([209.85.167.194]:35519 "EHLO mail-oi1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726393AbfKNDvW (ORCPT ); Wed, 13 Nov 2019 22:51:22 -0500 Received: by mail-oi1-f194.google.com with SMTP id n16so4024998oig.2; Wed, 13 Nov 2019 19:51:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=oTNGunsWbSvt43YXzCeF3NH4k2942fdpf8D5q79SgVU=; b=O5PrQ1HOh6MNMvmynIQEo/A6e9bNN8fnEemRDCPzwTzD2yKvWxQKxLng92yJxCvFz/ qXi05MCCH87j5JQIpPBroCsdIw0T+wMw1F4W6xtyxIyibZXGX4Vx90+fj+F2uKv9fiuJ +MUvoVWyZumwU6usy1VABi/N1rqD/m0JhQ8/fPDbN5coQvmDjq5pBoKtvE8MiSeyrDw1 xT+BRZC8evgvljgk6bFkIzNZBmoRGCT92ZJD2GrQWmdtOPYlHozpSaVfERypfl8JuBgu 7n97xgnsyIAwKWVdQXHyGcOZoHV98cymsiscF62QCpLo9sn+g1ltTQGh5ACreFZ9LF0f iuhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=oTNGunsWbSvt43YXzCeF3NH4k2942fdpf8D5q79SgVU=; b=ouUIkXESd+bwE2060Z5ONd/wUTeTKYUGn8KhtWm3wlTbRyb9Xm/fldWtBgSF3mf5C/ WKhrxNGxmYA4vua0fJR797qQbGwFSSw1tWlYeSHrrzUM4Gk/270ifNFhL+L2xtniM6xn nF7i5A+7nu12e2HV5LSWBQK3KaZ8yZD19VWgBNTAQC5qhXNeorgRLsbwHzPhjxuBfNy3 X4pFCkgvcdndqVhQ5elRA2u0560vubDX4jieYqMaef/E4FkX2U7PyKnCy5g4Qzlj5ePU 1qhEG/s01m+hvTNpoL6XcWQ4/JjjGBBCHPBlyKUU0J+9viZ1zqpQkiCGcySER1bqX2lp My3A== X-Gm-Message-State: APjAAAUZyeBhOJQNcGniZyzjFjWCzsKZetkg1SuPz9eEDjG2Luhj/S/Z DEjTzAB8kOytvrX04lYrhtuYR84DIqBfzKFP/kM= X-Received: by 2002:aca:39d6:: with SMTP id g205mr1735278oia.33.1573703481267; Wed, 13 Nov 2019 19:51:21 -0800 (PST) MIME-Version: 1.0 References: <20191027105243.34339-1-like.xu@linux.intel.com> <20191027105243.34339-6-like.xu@linux.intel.com> In-Reply-To: <20191027105243.34339-6-like.xu@linux.intel.com> From: Wanpeng Li Date: Thu, 14 Nov 2019 11:51:11 +0800 Message-ID: Subject: Re: [PATCH v4 5/6] KVM: x86/vPMU: Reuse perf_event to avoid unnecessary pmc_reprogram_counter To: Like Xu Cc: Peter Zijlstra , Paolo Bonzini , Sean Christopherson , Jim Mattson , Wanpeng Li , Alexander Shishkin , Arnaldo Carvalho de Melo , Borislav Petkov , Ingo Molnar , Jiri Olsa , Joerg Roedel , Namhyung Kim , Thomas Gleixner , Vitaly Kuznetsov , kan.liang@intel.com, wei.w.wang@intel.com, LKML , kvm Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 28 Oct 2019 at 21:06, Like Xu wrote: > > The perf_event_create_kernel_counter() in the pmc_reprogram_counter() is > a heavyweight and high-frequency operation, especially when host disables > the watchdog (maximum 21000000 ns) which leads to an unacceptable latency Why when host disables the watchdog, perf_event_create_kernel_counter() is more heavyweight and high-frequency operation? Wanpeng