Re: [RFT] kvm with Windows optimization

Anthony Liguori
2007-10-25T23:31:20Z

[-- Attachment #1: Type: text/plain, Size: 1142 bytes --]

Avi Kivity wrote:
> Anthony Liguori wrote:
>>>
>>>> static int mmu_topup_memory_caches(struct kvm_vcpu *vcpu)
>>>> {
>>>> int r;
>>>>
>>>> kvm_mmu_free_some_pages(vcpu);
>>>> r = mmu_topup_memory_cache(&vcpu->mmu_pte_chain_cache,
>>>> pte_chain_cache, 4);
>>>> if (r)
>>>> goto out;
>>>> r = mmu_topup_memory_cache(&vcpu->mmu_rmap_desc_cache,
>>>> rmap_desc_cache, 1);
>>>> if (r)
>>>> goto out;
>>>> r = mmu_topup_memory_cache_page(&vcpu->mmu_page_cache, 8);
>>>> if (r)
>>>> goto out;
>>>> r = mmu_topup_memory_cache(&vcpu->mmu_page_header_cache,
>>>> mmu_page_header_cache, 4);
>>>> out:
>>>> return r;
>>>> }
>>>
>>>
>>> These are the (4, 1, 8, 4) values in the call to
>>> mmu_topup_memory_cache. Perhaps one of them is too low.
>>
>> Sure. Would this be affected at all by your tpr patch?

Using the following patch, I'm getting really good results. I'll keep
running test cases tonight and see if I can trigger anything.

Windows is *much* faster with your patch, very nice work!

Regards,

Anthony Liguori

[-- Attachment #2: tpr-out-up-rmap_desc_cache.diff --]
[-- Type: text/x-patch, Size: 919 bytes --]

Subject: [PATCH][TPR OPT] Increase rmap_desc_cache
From: Anthony Liguori <aliguori-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Cc: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>

Using kvm-test to replay the second stage of a WinXP Pro install, I can
reliably trigger a BUG_ON() in the mmu. It usually happens during the first
run.

With this patch applied, I've been able to replay the install for the past few
hours (probably 10 or so installs) without hitting the BUG_ON().

Signed-off-by: Anthony Liguori <aliguori-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>

--- a/kernel/mmu.c 2007-10-25 12:36:18.000000000 -0500
+++ b/kernel/mmu.c 2007-10-25 17:09:55.000000000 -0500
@@ -280,7 +280,7 @@
if (r)
goto out;
r = mmu_topup_memory_cache(&vcpu->mmu_rmap_desc_cache,
- rmap_desc_cache, 1);
+ rmap_desc_cache, 2);
if (r)
goto out;
r = mmu_topup_memory_cache_page(&vcpu->mmu_page_cache, 8);

[-- Attachment #3: Type: text/plain, Size: 314 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

[-- Attachment #4: Type: text/plain, Size: 186 bytes --]

_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org