* [PATCH] KVM: mmu: honor global bit on huge pages
@ 2006-12-04 14:57 Avi Kivity
2006-12-04 15:26 ` Renato S. Yamane
0 siblings, 1 reply; 4+ messages in thread
From: Avi Kivity @ 2006-12-04 14:57 UTC (permalink / raw)
To: kvm-devel; +Cc: akpm, mingo, linux-kernel
The kvm mmu attempts to cache global translations, however it misses on
global huge page translation (which is what most global pages are).
By caching global huge page translations, boot time of fc5 i386 on i386
is reduced from ~35 seconds to ~24 seconds.
Signed-off-by: Avi Kivity <avi@qumranet.com>
Index: linux-2.6/drivers/kvm/paging_tmpl.h
===================================================================
--- linux-2.6.orig/drivers/kvm/paging_tmpl.h
+++ linux-2.6/drivers/kvm/paging_tmpl.h
@@ -105,7 +105,7 @@ static void FNAME(set_pde)(struct kvm_vc
if (PTTYPE == 32 && is_cpuid_PSE36())
gaddr |= (guest_pde & PT32_DIR_PSE36_MASK) <<
(32 - PT32_DIR_PSE36_SHIFT);
- *shadow_pte = (guest_pde & PT_NON_PTE_COPY_MASK) |
+ *shadow_pte = (guest_pde & (PT_NON_PTE_COPY_MASK | PT_GLOBAL_MASK)) |
((guest_pde & PT_DIR_PAT_MASK) >>
(PT_DIR_PAT_SHIFT - PT_PAT_SHIFT));
set_pte_common(vcpu, shadow_pte, gaddr,
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] KVM: mmu: honor global bit on huge pages
2006-12-04 14:57 [PATCH] KVM: mmu: honor global bit on huge pages Avi Kivity
@ 2006-12-04 15:26 ` Renato S. Yamane
2006-12-04 15:29 ` Avi Kivity
0 siblings, 1 reply; 4+ messages in thread
From: Renato S. Yamane @ 2006-12-04 15:26 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm-devel, akpm, mingo, linux-kernel, renatoyamane
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Em 04-12-2006 12:57, Avi Kivity escreveu:
> The kvm mmu attempts to cache global translations, however it misses on
> global huge page translation (which is what most global pages are).
>
> By caching global huge page translations, boot time of fc5 i386 on i386
> is reduced from ~35 seconds to ~24 seconds.
I try use this patch in Kernel 2.6.19-git5, but I receive an error message:
/linux-2.6.19# patch -p1 < /home/yamane/Desktop/kernel/kvm.patch
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
- --------------------------
|--- linux-2.6.orig/drivers/kvm/paging_tmpl.h
|+++ linux-2.6/drivers/kvm/paging_tmpl.h
- --------------------------
File to patch:
Whats wrong? :-(
Best regards,
- --
Renato S. Yamane
Fingerprint: 68AE A381 938A F4B9 8A23 D11A E351 5030 D420 515A
PGP Server: http://pgp.mit.edu/ --> KeyID: 0xD420515A
<http://www.renatoyamane.com>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org
iD8DBQFFdD4M41FQMNQgUVoRAqLLAJ0QY0x67w7TrYFqJqgCZ3XT3i35IgCeNfvy
+YYKNzrY46tvbM+nf9u1lc4=
=gkQV
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] KVM: mmu: honor global bit on huge pages
2006-12-04 15:26 ` Renato S. Yamane
@ 2006-12-04 15:29 ` Avi Kivity
2006-12-04 15:32 ` Avi Kivity
0 siblings, 1 reply; 4+ messages in thread
From: Avi Kivity @ 2006-12-04 15:29 UTC (permalink / raw)
To: Renato S. Yamane; +Cc: kvm-devel, akpm, mingo, linux-kernel
Renato S. Yamane wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Em 04-12-2006 12:57, Avi Kivity escreveu:
>
>> The kvm mmu attempts to cache global translations, however it misses on
>> global huge page translation (which is what most global pages are).
>>
>> By caching global huge page translations, boot time of fc5 i386 on i386
>> is reduced from ~35 seconds to ~24 seconds.
>>
>
> I try use this patch in Kernel 2.6.19-git5, but I receive an error message:
>
> /linux-2.6.19# patch -p1 < /home/yamane/Desktop/kernel/kvm.patch
> can't find file to patch at input line 3
> Perhaps you used the wrong -p or --strip option?
> The text leading up to this was:
> - --------------------------
> |--- linux-2.6.orig/drivers/kvm/paging_tmpl.h
> |+++ linux-2.6/drivers/kvm/paging_tmpl.h
> - --------------------------
> File to patch:
>
> Whats wrong? :-(
>
This patch is for kvm, which lives in the -mm kernel. Apply the latest
-mm patch first.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] KVM: mmu: honor global bit on huge pages
2006-12-04 15:29 ` Avi Kivity
@ 2006-12-04 15:32 ` Avi Kivity
0 siblings, 0 replies; 4+ messages in thread
From: Avi Kivity @ 2006-12-04 15:32 UTC (permalink / raw)
To: Renato S. Yamane; +Cc: kvm-devel, akpm, mingo, linux-kernel
Avi Kivity wrote:
>>
>> Whats wrong? :-(
>>
>
> This patch is for kvm, which lives in the -mm kernel. Apply the
> latest -mm patch first.
>
>
Oh, and visit http://kvm.sourceforge.net first :)
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-12-04 15:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-04 14:57 [PATCH] KVM: mmu: honor global bit on huge pages Avi Kivity
2006-12-04 15:26 ` Renato S. Yamane
2006-12-04 15:29 ` Avi Kivity
2006-12-04 15:32 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox