linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Alexander Graf <agraf@suse.de>
Cc: linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
	KVM list <kvm@vger.kernel.org>,
	kvm-ppc@vger.kernel.org
Subject: Re: [PATCH 4/7] KVM: PPC: Add book3s_32 tlbie flush acceleration
Date: Sun, 01 Aug 2010 17:08:49 +0300	[thread overview]
Message-ID: <4C557FF1.4000400@redhat.com> (raw)
In-Reply-To: <1280408662-10328-5-git-send-email-agraf@suse.de>

  On 07/29/2010 04:04 PM, Alexander Graf wrote:
> On Book3s_32 the tlbie instruction flushed effective addresses by the mask
> 0x0ffff000. This is pretty hard to reflect with a hash that hashes ~0xfff, so
> to speed up that target we should also keep a special hash around for it.
>
>
>   static inline u64 kvmppc_mmu_hash_vpte(u64 vpage)
>   {
>   	return hash_64(vpage&  0xfffffffffULL, HPTEG_HASH_BITS_VPTE);
> @@ -66,6 +72,11 @@ void kvmppc_mmu_hpte_cache_map(struct kvm_vcpu *vcpu, struct hpte_cache *pte)
>   	index = kvmppc_mmu_hash_pte(pte->pte.eaddr);
>   	hlist_add_head_rcu(&pte->list_pte,&vcpu->arch.hpte_hash_pte[index]);
>
> +	/* Add to ePTE_long list */
> +	index = kvmppc_mmu_hash_pte_long(pte->pte.eaddr);
> +	hlist_add_head_rcu(&pte->list_pte_long,
> +			&vcpu->arch.hpte_hash_pte_long[index]);
> +

Isn't it better to make operations on this list conditional on 
Book3s_32?  Hashes are expensive since they usually cost cache misses.

Can of course be done later as an optimization.

-- 
error compiling committee.c: too many arguments to function

  reply	other threads:[~2010-08-01 14:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-29 13:04 [PATCH 0/7] Rest of my KVM-PPC patch queue Alexander Graf
2010-07-29 13:04 ` [PATCH 1/7] KVM: PPC: Book3S_32 MMU debug compile fixes Alexander Graf
2010-07-29 13:04 ` [PATCH 2/7] KVM: PPC: RCU'ify the Book3s MMU Alexander Graf
2010-07-29 13:04 ` [PATCH 3/7] KVM: PPC: correctly check gfn_to_pfn() return value Alexander Graf
2010-07-29 13:04 ` [PATCH 4/7] KVM: PPC: Add book3s_32 tlbie flush acceleration Alexander Graf
2010-08-01 14:08   ` Avi Kivity [this message]
2010-08-01 20:20     ` Alexander Graf
2010-07-29 13:04 ` [PATCH 5/7] KVM: PPC: Use MSR_DR for external load_up Alexander Graf
2010-07-29 13:04 ` [PATCH 6/7] KVM: PPC: Make long relocations be ulong Alexander Graf
2010-07-29 13:04 ` [PATCH 7/7] KVM: PPC: Move KVM trampolines before __end_interrupts Alexander Graf
2010-08-01 14:09 ` [PATCH 0/7] Rest of my KVM-PPC patch queue Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C557FF1.4000400@redhat.com \
    --to=avi@redhat.com \
    --cc=agraf@suse.de \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).