mirror of https://gitee.com/openkylin/qemu.git
cd0c6f4735
On ppc64 especially, we flush the tlb on any slbie or tlbie instruction. However, those instructions often come in bursts of 3 or more (context switch will favor a series of slbie's for example to an slbia if the SLB has less than a certain number of entries in it, and tlbie's can happen in a series, with PAPR, H_BULK_REMOVE can remove up to 4 entries at a time. Doing a tlb_flush() each time is a waste of time. We end up doing a memset of the whole TLB, reloading it for the next instruction, memset'ing again, etc... Those instructions don't have to take effect immediately. For slbie, they can wait for the next context synchronizing event. For tlbie, the next tlbsync. This implements batching by keeping a flag that indicates that we have a TLB in need of flushing. We check it on interrupts, rfi's, isync's and tlbsync and flush the TLB if needed. This reduces the number of tlb_flush() on a boot to a ubuntu installer first dialog screen from roughly 360K down to 36K. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> [clg: added a 'CPUPPCState *' variable in h_remove() and h_bulk_remove() ] Signed-off-by: Cédric Le Goater <clg@kaod.org> [dwg: removed spurious whitespace change, use 0/1 not true/false consistently, since tlb_need_flush has int type] Signed-off-by: David Gibson <david@gibson.dropbear.id.au> |
||
---|---|---|
.. | ||
Makefile.objs | ||
e500-ccsr.h | ||
e500.c | ||
e500.h | ||
e500plat.c | ||
mac.h | ||
mac_newworld.c | ||
mac_oldworld.c | ||
mpc8544_guts.c | ||
mpc8544ds.c | ||
ppc.c | ||
ppc4xx_devs.c | ||
ppc4xx_pci.c | ||
ppc405.h | ||
ppc405_boards.c | ||
ppc405_uc.c | ||
ppc440_bamboo.c | ||
ppc_booke.c | ||
ppce500_spin.c | ||
prep.c | ||
spapr.c | ||
spapr_drc.c | ||
spapr_events.c | ||
spapr_hcall.c | ||
spapr_iommu.c | ||
spapr_pci.c | ||
spapr_pci_vfio.c | ||
spapr_rng.c | ||
spapr_rtas.c | ||
spapr_rtc.c | ||
spapr_vio.c | ||
virtex_ml507.c |