All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mario Smarduch <m.smarduch@samsung.com>
To: kvmarm@lists.cs.columbia.edu, marc.zyngier@arm.com,
	christoffer.dall@linaro.org
Cc: linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org,
	pbonzini@redhat.com, catalin.marinas@arm.com,
	will.deacon@arm.com, Mario Smarduch <m.smarduch@samsung.com>
Subject: [PATCH 0/3] arm: KVM: VFP lazy switch in KVM Host Mode may save upto 98%
Date: Wed, 24 Jun 2015 20:30:25 -0700	[thread overview]
Message-ID: <1435203028-23142-1-git-send-email-m.smarduch@samsung.com> (raw)

Currently we do a lazy VFP switch in Hyp mode, but once we exit and re-enter hyp
mode we trap again on VFP access. This mode has shown around 30-50% improvement
running hackbench and lmbench.

This patch series extends lazy VFP switch beyond Hyp mode to KVM host mode.

1 - On guest access we switch from host to guest and set a flag accessible to 
    host
2 - On exit to KVM host, VFP state is restored on vcpu_put if flag is marked (1)
3 - Otherwise guest is resumed and continues to use its VFP registers. 
4 - In case of 2 on VM entry we set VFP trap flag to repeat 1.

If guest does not access VFP registers them implemenation remains the same.

Executing hackbench on Fast Models and Exynos arm32 board shows good
results. Considering all exits 2% of the time KVM host lazy vfp switch is 
invoked.

Howeverr this patch set requires more burn in time and testing under various 
loads.

Currently ARM32 is addressed later ARM64.

Mario Smarduch (3):
  define headers and offsets to mange VFP state
  Implement lazy VFP switching outside of Hyp Mode
  Add VFP lazy switch hooks in Host KVM

 arch/arm/include/asm/kvm_asm.h  |    1 +
 arch/arm/include/asm/kvm_host.h |    3 +++
 arch/arm/kernel/asm-offsets.c   |    1 +
 arch/arm/kvm/arm.c              |   15 ++++++++++++
 arch/arm/kvm/interrupts.S       |   49 +++++++++++++++++++++++++--------------
 5 files changed, 51 insertions(+), 18 deletions(-)

-- 
1.7.9.5


WARNING: multiple messages have this Message-ID (diff)
From: m.smarduch@samsung.com (Mario Smarduch)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/3] arm: KVM: VFP lazy switch in KVM Host Mode may save upto 98%
Date: Wed, 24 Jun 2015 20:30:25 -0700	[thread overview]
Message-ID: <1435203028-23142-1-git-send-email-m.smarduch@samsung.com> (raw)

Currently we do a lazy VFP switch in Hyp mode, but once we exit and re-enter hyp
mode we trap again on VFP access. This mode has shown around 30-50% improvement
running hackbench and lmbench.

This patch series extends lazy VFP switch beyond Hyp mode to KVM host mode.

1 - On guest access we switch from host to guest and set a flag accessible to 
    host
2 - On exit to KVM host, VFP state is restored on vcpu_put if flag is marked (1)
3 - Otherwise guest is resumed and continues to use its VFP registers. 
4 - In case of 2 on VM entry we set VFP trap flag to repeat 1.

If guest does not access VFP registers them implemenation remains the same.

Executing hackbench on Fast Models and Exynos arm32 board shows good
results. Considering all exits 2% of the time KVM host lazy vfp switch is 
invoked.

Howeverr this patch set requires more burn in time and testing under various 
loads.

Currently ARM32 is addressed later ARM64.

Mario Smarduch (3):
  define headers and offsets to mange VFP state
  Implement lazy VFP switching outside of Hyp Mode
  Add VFP lazy switch hooks in Host KVM

 arch/arm/include/asm/kvm_asm.h  |    1 +
 arch/arm/include/asm/kvm_host.h |    3 +++
 arch/arm/kernel/asm-offsets.c   |    1 +
 arch/arm/kvm/arm.c              |   15 ++++++++++++
 arch/arm/kvm/interrupts.S       |   49 +++++++++++++++++++++++++--------------
 5 files changed, 51 insertions(+), 18 deletions(-)

-- 
1.7.9.5

             reply	other threads:[~2015-06-25  3:30 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-25  3:30 Mario Smarduch [this message]
2015-06-25  3:30 ` [PATCH 0/3] arm: KVM: VFP lazy switch in KVM Host Mode may save upto 98% Mario Smarduch
2015-06-25  3:30 ` [PATCH 1/3] arm: KVM: define headers and offsets to mange VFP state Mario Smarduch
2015-06-25  3:30   ` Mario Smarduch
2015-07-05 19:27   ` Christoffer Dall
2015-07-05 19:27     ` Christoffer Dall
2015-07-06 17:50     ` Mario Smarduch
2015-07-06 17:50       ` Mario Smarduch
2015-06-25  3:30 ` [PATCH 2/3] arm: KVM: Implement lazy VFP switching outside of Hyp Mode Mario Smarduch
2015-06-25  3:30   ` Mario Smarduch
2015-07-05 19:34   ` Christoffer Dall
2015-07-05 19:34     ` Christoffer Dall
2015-07-06 17:54     ` Mario Smarduch
2015-07-06 17:54       ` Mario Smarduch
2015-07-07 15:27       ` Christoffer Dall
2015-07-07 15:27         ` Christoffer Dall
2015-06-25  3:30 ` [PATCH 3/3] arm: KVM: Add VFP lazy switch hooks in Host KVM Mario Smarduch
2015-06-25  3:30   ` Mario Smarduch
2015-07-05 19:37   ` Christoffer Dall
2015-07-05 19:37     ` Christoffer Dall
2015-07-06 18:35     ` Mario Smarduch
2015-07-06 18:35       ` Mario Smarduch
2015-06-28 17:57 ` [PATCH 0/3] arm: KVM: VFP lazy switch in KVM Host Mode may save upto 98% Mario Smarduch
2015-06-28 17:57   ` Mario Smarduch
2015-07-05 19:37 ` Christoffer Dall
2015-07-05 19:37   ` Christoffer Dall
2015-07-06 18:43   ` Mario Smarduch
2015-07-06 18:43     ` Mario Smarduch

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=1435203028-23142-1-git-send-email-m.smarduch@samsung.com \
    --to=m.smarduch@samsung.com \
    --cc=catalin.marinas@arm.com \
    --cc=christoffer.dall@linaro.org \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=marc.zyngier@arm.com \
    --cc=pbonzini@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.