linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Punit Agrawal <punit.agrawal@arm.com>
To: Will Deacon <will.deacon@arm.com>
Cc: kvm@vger.kernel.org, Marc Zyngier <marc.zyngier@arm.com>,
	linux-kernel@vger.kernel.org,
	Steven Rostedt <rostedt@goodmis.org>,
	Ingo Molnar <mingo@redhat.com>,
	kvmarm@lists.cs.columbia.edu,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [RFC PATCH 6/7] arm64: KVM: Handle trappable TLB instructions
Date: Thu, 01 Sep 2016 19:29:37 +0100	[thread overview]
Message-ID: <878tvblbhq.fsf@e105922-lin.cambridge.arm.com> (raw)
In-Reply-To: <20160901145525.GM6721@arm.com> (Will Deacon's message of "Thu, 1 Sep 2016 15:55:25 +0100")

Will Deacon <will.deacon@arm.com> writes:

> On Fri, Aug 26, 2016 at 10:37:08AM +0100, Punit Agrawal wrote:
>> > Will Deacon <will.deacon@arm.com> writes:
>> >> The easiest thing to do is just TLBI VMALLE1IS for all trapped operations,
>> >> but you might want to see how that performs.
>> >
>> > That sounds reasonable for correctness. But I suspect we'll have to do
>> > more to claw back some performance. Let me run a few tests and come back
>> > on this.
>> 
>> Assuming I've correctly switched in TCR and replacing the various TLB
>> operations in this patch with TLBI VMALLE1IS, there is a drop in kernel
>> build times of ~5% (384s vs 363s).
>
> What do you mean by "switched in TCR"? Why is that necessary if you just
> nuke the whole thing?

You're right. it's not necessary. I'd misunderstood how TCR affects
things and was switching it in the above tests.

> Is the ~5% relative to no trapping at all, or
> trapping, but being selective about the operation?

The reported number was relative to trapping and being selective about
the operation. But I hadn't been careful in ensuring identical
conditions (page caches, etc.) when running the numbers.

So I've done a fresh set of identical measurements by running "time make
-j 7" in a VM booted with 7 vcpus and see the following results

1. no trapping ~ 365s
2. traps using selective tlb operations ~ 371s
3. traps that nuke all stage 1 (tlbi vmalle1is) ~ 393s

So based on these measurements there is ~1% and ~7.5% drop in comparison
between 2. and 3. compared to the base case of no trapping at all.

Thanks,
Punit

>
> Will
> _______________________________________________
> kvmarm mailing list
> kvmarm@lists.cs.columbia.edu
> https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

  reply	other threads:[~2016-09-01 21:49 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-16 10:45 [RFC PATCH 0/7] Add support for monitoring guest TLB operations Punit Agrawal
2016-08-16 10:45 ` [RFC PATCH 1/7] perf/trace: Add notification for perf trace events Punit Agrawal
2016-08-31 11:01   ` Punit Agrawal
2016-08-16 10:45 ` [RFC PATCH 2/7] KVM: Track the pid of the VM process Punit Agrawal
2016-08-16 10:45 ` [RFC PATCH 3/7] KVM: arm/arm64: Register perf trace event notifier Punit Agrawal
2016-08-16 10:45 ` [RFC PATCH 4/7] arm64: tlbflush.h: add __tlbi() macro Punit Agrawal
2016-08-19 13:24   ` Will Deacon
2016-08-19 13:34     ` Punit Agrawal
2016-08-16 10:45 ` [RFC PATCH 5/7] arm64/kvm: hyp: tlb: use __tlbi() helper Punit Agrawal
2016-08-16 10:45 ` [RFC PATCH 6/7] arm64: KVM: Handle trappable TLB instructions Punit Agrawal
2016-08-19 15:18   ` Will Deacon
2016-08-24 10:40     ` Punit Agrawal
2016-08-26  9:37       ` Punit Agrawal
2016-08-26 12:21         ` Marc Zyngier
2016-09-01 14:55         ` Will Deacon
2016-09-01 18:29           ` Punit Agrawal [this message]
2016-08-16 10:45 ` [RFC PATCH 7/7] arm64: KVM: Enable selective trapping of " Punit Agrawal
2016-08-17 15:58 ` [RFC PATCH 0/7] Add support for monitoring guest TLB operations Paolo Bonzini
2016-08-17 17:01   ` Punit Agrawal
2016-08-17 17:02     ` Paolo Bonzini
2016-08-17 17:20       ` Punit Agrawal
2016-08-18  7:04         ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878tvblbhq.fsf@e105922-lin.cambridge.arm.com \
    --to=punit.agrawal@arm.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).