[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] RE: [Xen-ia64-devel] [PATCH] unify vtlb and vhpt
>> Limiting the entry to be not moved to VHPT head could solve this >> issue but again the code will be complicated. >> >> Sharing VTLB/VHPT memory could be simply used here, and the patch >> will be more smaller and simple IMO. >My concept is just sharing vTLB/VHPT memory. >As long as sharing the pool of collision chain, >distinction of vTLB/VHPT can't be avoided I am not sure about the statement. Putting vTLB in physical VHPT side is mixing something, not only sharing. What I mean here is something like following pseudo code, (defenitely init code and many cleanup was not in this pseudo code). This way, we don't impact low level VHPT walk. and makes it clear in concept to distinguish vTLB & VHPT. diff -r ff90abf572f2 xen/arch/ia64/vmx/vtlb.c --- a/xen/arch/ia64/vmx/vtlb.c Fri Jan 18 14:11:20 2008 -0700 +++ b/xen/arch/ia64/vmx/vtlb.c Tue Mar 04 02:18:33 2008 +0800 @@ -398,7 +398,9 @@ static thash_data_t *__alloc_chain(thash cch = cch_alloc(hcb); if (cch == NULL) { - thash_recycle_cch_all(hcb); + vcpu = container_of(hcb, vcpu, vtlb); + thash_recycle_cch_all(&vcpu->vtlb); + thash_recycle_cch_all(&vcpu->vhpt); cch = cch_alloc(hcb); } return cch; @@ -440,12 +442,13 @@ static void vtlb_insert(VCPU *v, u64 pte } cch = cch->next; } + vcpu = container_of(hcb, vcpu, vtlb); if (hash_table->len >= MAX_CCN_DEPTH) { thash_recycle_cch(hcb, hash_table); - cch = cch_alloc(hcb); + cch = cch_alloc(&vcpu->vhpt); } else { - cch = __alloc_chain(hcb); + cch = __alloc_chain(&vcpu->vhpt); } cch->page_flags = pte; cch->itir = itir; _______________________________________________ Xen-ia64-devel mailing list Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-ia64-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |