From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752901AbcHQRCj (ORCPT ); Wed, 17 Aug 2016 13:02:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47583 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752163AbcHQRCi (ORCPT ); Wed, 17 Aug 2016 13:02:38 -0400 Subject: Re: [RFC PATCH 0/7] Add support for monitoring guest TLB operations To: Punit Agrawal References: <1471344312-26685-1-git-send-email-punit.agrawal@arm.com> <87fuq3tjmv.fsf@e105922-lin.cambridge.arm.com> Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, Marc Zyngier , Ingo Molnar , Will Deacon , Steven Rostedt From: Paolo Bonzini Message-ID: Date: Wed, 17 Aug 2016 19:02:32 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <87fuq3tjmv.fsf@e105922-lin.cambridge.arm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 17 Aug 2016 17:02:37 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 17/08/2016 19:01, Punit Agrawal wrote: >> Can you explain what this is used for? In other words, why would this >> be used instead of just running perf in the guest? > > As TLB maintenance operations are synchronised in hardware, they can > impact performance beyond the guest. The operations generate traffic on > the interconnect and depending on the implementation, they can also > affect the remote TLB's translation bandwidth. > > These patches are useful on systems where the host and guest are > controlled by different users - the guest could be running arbitrary > software. > > Having the ability to monitor the usage of guest TLB invalidations in > the host can be useful to diagnose performance issues on such systems. Are there hardware performance counters for these operations? Paolo