Re: [RFT - PATCH v2 0/2] KVM/arm64: add fp/simd lazy switch support

2015-10-20 Thread Christoffer Dall
On Mon, Oct 19, 2015 at 03:06:59PM -0700, Mario Smarduch wrote:
> 
> 
> On 10/18/2015 2:07 PM, Christoffer Dall wrote:
> > On Mon, Oct 12, 2015 at 09:29:23AM -0700, Mario Smarduch wrote:
> >> Hi Christoffer, Marc -
> >>   I just threw this test your way without any explanation.
> > 
> > I'm confused.  Did you send me something somewhere already?
> Yes in the last patchset
> 
> https://lists.cs.columbia.edu/pipermail/kvmarm/2015-October/016698.html
> 
> I included a simple test I put together.
> 

Sorry, I missed that change in the cover letter.

> > 
> >>
> >> The test loops, does fp arithmetic and checks the truncated result.
> >> It could be a little more dynamic have an initial run to
> >> get the sum to compare against while looping, different fp
> >> hardware may come up with a different sum, but truncation is
> >> to 5'th decimal point.
> >>
> >> The rationale is that if there is any fp/simd corruption
> >> one of these runs should fail. I think most likely scenario
> >> for that is a world switch in midst of fp operation. I've
> >> instrumented (basically add some tracing to vcpu_put()) and
> >> validated vcpu_put gets called thousands of time (for v7,v8)
> >> for an over night test running two guests/host crunching
> >> fp operations.
> >>
> >> Other then that not sure how to really catch any problems
> >> with the patches applied. Obviously this is a huge issues, if this has
> >> any problems. If you or Marc have any other ideas I'd be happy
> >> to enhance the test.
> > 
> > I think it's important to run two VMs at the same time, each with some
> > floating-point work, and then run some floating point on the host at the
> > same time.
> > 
> > You can make that even more interesting by doing 32-bit guests at the
> > same time as well.
> 
> Yes that's the test combination I've been running.

ok, cool, then I trust these patches.

> > 
> > I believe Marc was running Panranoia
> > (http://www.netlib.org/paranoia/paranoia.c) to test the last lazy
> > series.
> 
> I'll try this test and run it for several days, see if anything shows up.
> 

I actually don't know what it does, i.e. if it just uses the FP hardware
or if it actually checks the results produced.

Several days may be unnecessary, but if your machine has nothing else to
do, then why not.

Thanks,
-Christoffer
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFT - PATCH v2 0/2] KVM/arm64: add fp/simd lazy switch support

2015-10-19 Thread Mario Smarduch


On 10/18/2015 2:07 PM, Christoffer Dall wrote:
> On Mon, Oct 12, 2015 at 09:29:23AM -0700, Mario Smarduch wrote:
>> Hi Christoffer, Marc -
>>   I just threw this test your way without any explanation.
> 
> I'm confused.  Did you send me something somewhere already?
Yes in the last patchset

https://lists.cs.columbia.edu/pipermail/kvmarm/2015-October/016698.html

I included a simple test I put together.

> 
>>
>> The test loops, does fp arithmetic and checks the truncated result.
>> It could be a little more dynamic have an initial run to
>> get the sum to compare against while looping, different fp
>> hardware may come up with a different sum, but truncation is
>> to 5'th decimal point.
>>
>> The rationale is that if there is any fp/simd corruption
>> one of these runs should fail. I think most likely scenario
>> for that is a world switch in midst of fp operation. I've
>> instrumented (basically add some tracing to vcpu_put()) and
>> validated vcpu_put gets called thousands of time (for v7,v8)
>> for an over night test running two guests/host crunching
>> fp operations.
>>
>> Other then that not sure how to really catch any problems
>> with the patches applied. Obviously this is a huge issues, if this has
>> any problems. If you or Marc have any other ideas I'd be happy
>> to enhance the test.
> 
> I think it's important to run two VMs at the same time, each with some
> floating-point work, and then run some floating point on the host at the
> same time.
> 
> You can make that even more interesting by doing 32-bit guests at the
> same time as well.

Yes that's the test combination I've been running.
> 
> I believe Marc was running Panranoia
> (http://www.netlib.org/paranoia/paranoia.c) to test the last lazy
> series.

I'll try this test and run it for several days, see if anything shows up.

Thanks.
> 
> Thanks,
> -Christoffer
> 
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFT - PATCH v2 0/2] KVM/arm64: add fp/simd lazy switch support

2015-10-18 Thread Christoffer Dall
On Mon, Oct 12, 2015 at 09:29:23AM -0700, Mario Smarduch wrote:
> Hi Christoffer, Marc -
>   I just threw this test your way without any explanation.

I'm confused.  Did you send me something somewhere already?

> 
> The test loops, does fp arithmetic and checks the truncated result.
> It could be a little more dynamic have an initial run to
> get the sum to compare against while looping, different fp
> hardware may come up with a different sum, but truncation is
> to 5'th decimal point.
> 
> The rationale is that if there is any fp/simd corruption
> one of these runs should fail. I think most likely scenario
> for that is a world switch in midst of fp operation. I've
> instrumented (basically add some tracing to vcpu_put()) and
> validated vcpu_put gets called thousands of time (for v7,v8)
> for an over night test running two guests/host crunching
> fp operations.
> 
> Other then that not sure how to really catch any problems
> with the patches applied. Obviously this is a huge issues, if this has
> any problems. If you or Marc have any other ideas I'd be happy
> to enhance the test.

I think it's important to run two VMs at the same time, each with some
floating-point work, and then run some floating point on the host at the
same time.

You can make that even more interesting by doing 32-bit guests at the
same time as well.

I believe Marc was running Panranoia
(http://www.netlib.org/paranoia/paranoia.c) to test the last lazy
series.

Thanks,
-Christoffer
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFT - PATCH v2 0/2] KVM/arm64: add fp/simd lazy switch support

2015-10-12 Thread Mario Smarduch
Hi Christoffer, Marc -
  I just threw this test your way without any explanation.

The test loops, does fp arithmetic and checks the truncated result.
It could be a little more dynamic have an initial run to
get the sum to compare against while looping, different fp
hardware may come up with a different sum, but truncation is
to 5'th decimal point.

The rationale is that if there is any fp/simd corruption
one of these runs should fail. I think most likely scenario
for that is a world switch in midst of fp operation. I've
instrumented (basically add some tracing to vcpu_put()) and
validated vcpu_put gets called thousands of time (for v7,v8)
for an over night test running two guests/host crunching
fp operations.

Other then that not sure how to really catch any problems
with the patches applied. Obviously this is a huge issues, if this has
any problems. If you or Marc have any other ideas I'd be happy
to enhance the test.

Thanks,
  Mario

On 10/5/2015 8:45 AM, Christoffer Dall wrote:
> On Tue, Sep 22, 2015 at 04:34:01PM -0700, Mario Smarduch wrote:
>> This is a 2nd itteration for arm64, v1 patches were posted by mistake from 
>> an 
>> older branch which included several bugs. Hopefully didn't waste too much of 
>> anyones time.
>>
>> This patch series is a followup to the armv7 fp/simd lazy switch
>> implementation, uses similar approach and depends on the series - see
>> https://lists.cs.columbia.edu/pipermail/kvmarm/2015-September/016516.html
>>
>> It's based on earlier arm64 fp/simd optimization work - see
>> https://lists.cs.columbia.edu/pipermail/kvmarm/2015-July/015748.html
>>
>> And subsequent fixes by Marc and Christoffer at KVM Forum hackathon to handle
>> 32-bit guest on 64 bit host (and may require more here) - see
>> https://lists.cs.columbia.edu/pipermail/kvmarm/2015-August/016128.html
>>
>> This series has be tested with arm64 on arm64 with several FP applications 
>> running on host and guest, with substantial decrease on number of 
>> fp/simd context switches. From about 30% down to 2% with one guest running.
>>
>> At this time I don't have arm32/arm64 working and hoping Christoffer and/or
>> Marc (or anyone) can test 32-bit guest/64-bit host.
>>
> Did you already have some test infrastructure/applications that I can
> reuse for this purpose or do I have to write userspace software?
> 
> -Christoffer
> 
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [RFT - PATCH v2 0/2] KVM/arm64: add fp/simd lazy switch support

2015-10-05 Thread Mario Smarduch
Will do, I'll get them over to you.

-Original Message-
From: Christoffer Dall [mailto:christoffer.d...@linaro.org] 
Sent: Monday, October 05, 2015 10:26 AM
To: Mario Smarduch
Cc: kvm...@lists.cs.columbia.edu; marc.zyng...@arm.com; kvm@vger.kernel.org; 
linux-arm-ker...@lists.infradead.org
Subject: Re: [RFT - PATCH v2 0/2] KVM/arm64: add fp/simd lazy switch support

On Mon, Oct 05, 2015 at 09:14:57AM -0700, Mario Smarduch wrote:
> Hi Christoffer,
>I just managed to boot qemu arm32 up on arm64 (last Fri - thanks 
> for the tip
> - there were few other issue to clean up), so let me retest it again. 
> Also I noticed some refactoring would help both 32 and 64 bit patches.
> 
> Yes I could provide a the user space tests as well.
> 
I'd like those regardless as I generally test my queue before pushing it to 
next.

Thanks,
-Christoffer
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFT - PATCH v2 0/2] KVM/arm64: add fp/simd lazy switch support

2015-10-05 Thread Mario Smarduch
Hi Christoffer,
   I just managed to boot qemu arm32 up on arm64 (last Fri - thanks for the tip
- there were few other issue to clean up), so let me retest it again. Also I
noticed some refactoring would help both 32 and 64 bit patches.

Yes I could provide a the user space tests as well.

Thanks-
- Mario

On 10/5/2015 8:45 AM, Christoffer Dall wrote:
> On Tue, Sep 22, 2015 at 04:34:01PM -0700, Mario Smarduch wrote:
>> This is a 2nd itteration for arm64, v1 patches were posted by mistake from 
>> an 
>> older branch which included several bugs. Hopefully didn't waste too much of 
>> anyones time.
>>
>> This patch series is a followup to the armv7 fp/simd lazy switch
>> implementation, uses similar approach and depends on the series - see
>> https://lists.cs.columbia.edu/pipermail/kvmarm/2015-September/016516.html
>>
>> It's based on earlier arm64 fp/simd optimization work - see
>> https://lists.cs.columbia.edu/pipermail/kvmarm/2015-July/015748.html
>>
>> And subsequent fixes by Marc and Christoffer at KVM Forum hackathon to handle
>> 32-bit guest on 64 bit host (and may require more here) - see
>> https://lists.cs.columbia.edu/pipermail/kvmarm/2015-August/016128.html
>>
>> This series has be tested with arm64 on arm64 with several FP applications 
>> running on host and guest, with substantial decrease on number of 
>> fp/simd context switches. From about 30% down to 2% with one guest running.
>>
>> At this time I don't have arm32/arm64 working and hoping Christoffer and/or
>> Marc (or anyone) can test 32-bit guest/64-bit host.
>>
> Did you already have some test infrastructure/applications that I can
> reuse for this purpose or do I have to write userspace software?
> 
> -Christoffer
> 
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFT - PATCH v2 0/2] KVM/arm64: add fp/simd lazy switch support

2015-10-05 Thread Christoffer Dall
On Mon, Oct 05, 2015 at 09:14:57AM -0700, Mario Smarduch wrote:
> Hi Christoffer,
>I just managed to boot qemu arm32 up on arm64 (last Fri - thanks for the 
> tip
> - there were few other issue to clean up), so let me retest it again. Also I
> noticed some refactoring would help both 32 and 64 bit patches.
> 
> Yes I could provide a the user space tests as well.
> 
I'd like those regardless as I generally test my queue before pushing it
to next.

Thanks,
-Christoffer
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFT - PATCH v2 0/2] KVM/arm64: add fp/simd lazy switch support

2015-10-05 Thread Christoffer Dall
On Tue, Sep 22, 2015 at 04:34:01PM -0700, Mario Smarduch wrote:
> This is a 2nd itteration for arm64, v1 patches were posted by mistake from an 
> older branch which included several bugs. Hopefully didn't waste too much of 
> anyones time.
> 
> This patch series is a followup to the armv7 fp/simd lazy switch
> implementation, uses similar approach and depends on the series - see
> https://lists.cs.columbia.edu/pipermail/kvmarm/2015-September/016516.html
> 
> It's based on earlier arm64 fp/simd optimization work - see
> https://lists.cs.columbia.edu/pipermail/kvmarm/2015-July/015748.html
> 
> And subsequent fixes by Marc and Christoffer at KVM Forum hackathon to handle
> 32-bit guest on 64 bit host (and may require more here) - see
> https://lists.cs.columbia.edu/pipermail/kvmarm/2015-August/016128.html
> 
> This series has be tested with arm64 on arm64 with several FP applications 
> running on host and guest, with substantial decrease on number of 
> fp/simd context switches. From about 30% down to 2% with one guest running.
> 
> At this time I don't have arm32/arm64 working and hoping Christoffer and/or
> Marc (or anyone) can test 32-bit guest/64-bit host.
> 
Did you already have some test infrastructure/applications that I can
reuse for this purpose or do I have to write userspace software?

-Christoffer
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFT - PATCH v2 0/2] KVM/arm64: add fp/simd lazy switch support

2015-09-22 Thread Mario Smarduch
This is a 2nd itteration for arm64, v1 patches were posted by mistake from an 
older branch which included several bugs. Hopefully didn't waste too much of 
anyones time.

This patch series is a followup to the armv7 fp/simd lazy switch
implementation, uses similar approach and depends on the series - see
https://lists.cs.columbia.edu/pipermail/kvmarm/2015-September/016516.html

It's based on earlier arm64 fp/simd optimization work - see
https://lists.cs.columbia.edu/pipermail/kvmarm/2015-July/015748.html

And subsequent fixes by Marc and Christoffer at KVM Forum hackathon to handle
32-bit guest on 64 bit host (and may require more here) - see
https://lists.cs.columbia.edu/pipermail/kvmarm/2015-August/016128.html

This series has be tested with arm64 on arm64 with several FP applications 
running on host and guest, with substantial decrease on number of 
fp/simd context switches. From about 30% down to 2% with one guest running.

At this time I don't have arm32/arm64 working and hoping Christoffer and/or
Marc (or anyone) can test 32-bit guest/64-bit host.

Mario Smarduch (2):
  add hooks for armv8 fp/simd lazy switch
  enable armv8 fp/simd lazy switch

 arch/arm/kvm/arm.c|  2 --
 arch/arm64/include/asm/kvm_asm.h  |  1 +
 arch/arm64/include/asm/kvm_host.h |  3 ++
 arch/arm64/kernel/asm-offsets.c   |  1 +
 arch/arm64/kvm/hyp.S  | 58 ++-
 5 files changed, 44 insertions(+), 21 deletions(-)

-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html