void ___pte_free_tlb(struct mmu_gather *tlb, struct page *pte) { ktime_t local_tstart, local_tend; s64 local_act_time; pgtable_page_dtor(pte); paravirt_release_pte(page_to_pfn(pte)); //tlb_remove_page(tlb, pte); //added by zhang //free_pte_page((unsigned long)__va(PFN_PHYS(page_to_pfn(pte)))); //free_pte_page((unsigned long)page_address(pte)); if(cache_on) { if(timing_on) { local_tstart=ktime_get(); //free_pte_page(tlb, pte); free_pte_page(pte); local_tend=ktime_get(); local_act_time=ktime_to_ns(ktime_sub(local_tend, local_tstart)); spin_lock(&pte_free_cnt_lock); pte_free_waste += local_act_time; pte_free_cnt++; spin_unlock(&pte_free_cnt_lock); } else //free_pte_page(tlb,pte); free_pte_page(pte); } else { if(timing_on) { local_tstart=ktime_get(); tlb_remove_page(tlb, pte); local_tend=ktime_get(); local_act_time=ktime_to_ns(ktime_sub(local_tend, local_tstart)); spin_lock(&pte_free_cnt_lock); pte_free_waste += local_act_time; pte_free_cnt++; spin_unlock(&pte_free_cnt_lock); } else tlb_remove_page(tlb, pte); } }
void ___pte_free_tlb(struct mmu_gather *tlb, struct page *pte) { pgtable_page_dtor(pte); paravirt_release_pte(page_to_pfn(pte)); tlb_remove_page(tlb, pte); }