Re: [Qemu-ppc] [qemu-ppc] quesstion about kvm e500 tlb search method

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Kevin,

On 24.01.2013, at 14:15, Wangkai (Kevin,C) wrote:

> Dear,
>  
> I check e500 core reference when the e500 core lookup for L2mmu entries,
> TLB1 is preferred to TLB0.

Could you please point me to the respective part of the documentation?

> And for e500 KVM l2mmu lookup, I find that TLB0 is searched first, and it
> Was done by software.
>  
> And I suggest we can search TLB1 first, because TLB0 have more entries
> Than TLB1, and this can improve the guest kernel performance very much.

Actually TLB1 has more entries, because we only search one set at a time. For TLB1, one set means "all entries" which on e500mc would mean 64. For TLB0, we only need to check 4 entries. So looking at TLB0 is a lot faster.

Also, most misses in "normal" real world workloads should happen in user space.

> Can I do this change to the kvm code? Is there some other affect?

Let me try to understand what you're trying to fix. Are you seeing performance issues? What kernel are you running on? Are you using hugetlbfs? There are a lot of things that improve performance a lot more than this change would.

Also, let me CC kvm-ppc@vger, since you're really asking a KVM question here :).


Alex

>  
> Thanks!
> Wangkai
>  
>  
> int kvmppc_e500_tlb_search(struct kvm_vcpu *vcpu,
>                             gva_t eaddr, unsigned int pid, int as)
> {
>        struct kvmppc_vcpu_e500 *vcpu_e500 = to_e500(vcpu);
>        int esel, tlbsel;
>  
>        for (tlbsel = 0; tlbsel < 2; tlbsel++) {  // first tlb0, and then tlb1
>               esel = kvmppc_e500_tlb_index(vcpu_e500, eaddr, tlbsel, pid, as);
>               if (esel >= 0)
>                      return index_of(tlbsel, esel);
>        }
>  
>        return -1;
> }
>  
>  

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


[Index of Archives]     [KVM Development]     [KVM ARM]     [KVM ia64]     [Linux Virtualization]     [Linux USB Devel]     [Linux Video]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux