]> git.karo-electronics.de Git - linux-beck.git/commitdiff
KVM: PPC: Enable use of secondary htab bucket
authorAlexander Graf <agraf@suse.de>
Fri, 19 Feb 2010 10:00:46 +0000 (11:00 +0100)
committerAvi Kivity <avi@redhat.com>
Sun, 25 Apr 2010 09:37:58 +0000 (12:37 +0300)
We had code to make use of the secondary htab buckets, but kept that
disabled because it was unstable when I put it in.

I checked again if that's still the case and apparently it was only
exposing some instability that was there anyways before. I haven't
seen any badness related to usage of secondary htab entries so far.

This should speed up guest memory allocations by quite a bit, because
we now have more space to put PTEs in.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/powerpc/kvm/book3s_64_mmu_host.c

index f2899b297ffdc79181e82cfdc333261ec67df0c6..25bd4ede722c72d3256eb5cce9a5cbc6eb3de058 100644 (file)
@@ -257,16 +257,9 @@ map_again:
 
        if (ret < 0) {
                /* If we couldn't map a primary PTE, try a secondary */
-#ifdef USE_SECONDARY
                hash = ~hash;
+               vflags ^= HPTE_V_SECONDARY;
                attempt++;
-               if (attempt % 2)
-                       vflags = HPTE_V_SECONDARY;
-               else
-                       vflags = 0;
-#else
-               attempt = 2;
-#endif
                goto map_again;
        } else {
                int hpte_id = kvmppc_mmu_hpte_cache_next(vcpu);