From mboxrd@z Thu Jan 1 00:00:00 1970 From: Valentine Sinitsyn Subject: Re: SVM: vmload/vmsave-free VM exits? Date: Tue, 07 Apr 2015 11:29:43 +0500 Message-ID: <55237957.7010408@gmail.com> References: <5520F2C8.7090102@web.de> <55216CE5.9000504@gmail.com> <55236E6F.7090705@web.de> <552374E3.1060707@gmail.com> <55237590.2000305@web.de> <552376F2.2050902@gmail.com> <552377D4.1080605@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed To: Jan Kiszka , kvm , Jailhouse Return-path: In-Reply-To: <552377D4.1080605@web.de> List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , List-Id: kvm.vger.kernel.org On 07.04.2015 11:23, Jan Kiszka wrote: > On 2015-04-07 08:19, Valentine Sinitsyn wrote: >> On 07.04.2015 11:13, Jan Kiszka wrote: >>>>> It is, at least 160 cycles with hot caches on an AMD A6-5200 APU, more >>>>> towards 600 if they are colder (added some usleep to each loop in the >>>>> test). >>>> Great, thanks. Could you post absolute numbers, i.e how long do A and B >>>> take on your CPU? >>> >>> A is around 1910 cycles, B about 1750. >> It's with hot caches I guess? Not bad anyways, it's a pity I didn't >> observe this and didn't include this optimization from the day one. > > Yes, that is with the unmodified benchmark I sent. When I add, say > usleep(1000) to that loop body, the cycles jumped to 4k (IIRC). > > BTW, this is the Jailhouse patch: > https://github.com/siemens/jailhouse/commit/dbf2fe479ac07a677462dfa87e008e37a4e72858 I guess, it's getting off-topic here, but wouldn't it be cleaner to simply use wrmsr and rdmsr instead of vmload and vmsave in svm-vmexit.S? This would require less changes and will keep all entry/exit setup code in one place. Valentine -- You received this message because you are subscribed to the Google Groups "Jailhouse" group. To unsubscribe from this group and stop receiving emails from it, send an email to jailhouse-dev+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/d/optout.