高级计算机体系结构设计及其在数据中心和云计算的应用Exception-drivenandintermittentlyexecutedOsbranchesfailtobuildupaccurateand steady state inbranchpredictor,leadingtobranchaliasing.BHTBHTkkkU1111XXXBHSRBHSR(b)withuserinterference,evenastrongly(a)withoutuserinterference,astronglybiasedkernelbranchoccupiesandupdates(taken) biased kernel branch reaches steadymultipleBHTentriesstate inBHSR andoneBHT entry16
高级计算机体系结构设计及其在数据中心和云计算的应用 – Exception-driven and intermittently executed OS branches fail to build up accurate and steady state in branch predictor, leading to branch aliasing. 1 1 1 . 1 BHT k k k k K x x 1 . x BHT u u k u K ? 16 1 1 1 . 1 BHSR . (a) without user interference, a strongly (taken) biased kernel branch reaches steady state in BHSR and one BHT entry x x 1 . x BHSR . (b) with user interference, even a strongly biased kernel branch occupies and updates multiple BHT entries
高级计算机体系结构设计及其在数据中心和云计算的应用SignificantamountofOsbranchesareweakly-biasedWeakly-biasedkernelbranchesupdateBHTcounterswithdifferentpatterns,leadingtobranchaliasing.35-SPECJVM98-AVG-uSer3029.331.8SPECJVM98-AVG-kernel2524.22017.31514.313.91052.83.60(100%)always-not-taken (0%)lo/0S/-9%S-99%668-7969291%90%80%70%10%-ogolSSI06090Salways-takenBranchDirection17
高级计算机体系结构设计及其在数据中心和云计算的应用 – Significant amount of OS branches are weakly-biased • Weakly-biased kernel branches update BHT counters with different patterns, leading to branch aliasing. 31.8 17.3 29.3 24.2 20 25 30 35 % of Dynamic Branches SPECJVM98-AVG-user SPECJVM98-AVG-kernel 17 13.9 2.8 3.6 17.3 14.3 0 5 10 15 20 always-taken (100%) 90%-99% 80%-89% 70%-79% 60%-69% 50%-59% 40%-49% 30%-39% 20%-29% 10%-19% 1%-9% always-not-taken (0%) Branch Direction % of Dynamic Branches
高级计算机体系结构设计及其在数据中心和云计算的应用Aliasingmispredictions:upto6o%ofallmispredictions(Gshare,8Kentries)MispredictionsBreakdown(%)BenchmarksNon-aliasingAliasingCold-startdb1465304060jess04654ljavac04456jack06634mtrt08416compress18
高级计算机体系结构设计及其在数据中心和云计算的应用 – Aliasing mispredictions: up to 60% of all mispredictions (Gshare, 8K entries) Mispredictions Breakdown (%) Benchmarks Non-aliasing Aliasing Cold-start db 46 53 1 18 jess 40 60 0 javac 46 54 0 jack 44 56 0 mtrt 66 34 0 compress 84 16 0
高级计算机体系结构设计及其在数据中心和云计算的应用User-kernel aliasing mispredictions:approximate1/3ofaliasingmispredictionsAliasingMispredictionsBreakdown(Gshare,8Kentries)user-kernelkernel-kerneluser-userBenchmarksaliasingaliasingaliasingdb53%36%11%5%62%33%jess6%64%30%javac2%jack64%34%3%68%29%mtrt6%19%75%compress19
高级计算机体系结构设计及其在数据中心和云计算的应用 – User-kernel aliasing mispredictions: approximate 1/3 of aliasing mispredictions Aliasing Mispredictions Breakdown (Gshare, 8K entries) Benchmarks kernel-kernel aliasing user-user aliasing user-kernel aliasing db 11% 53% 36% jess 5% 62% 33% 19 javac 6% 64% 30% jack 2% 64% 34% mtrt 3% 68% 29% compress 6% 75% 19%
高级计算机体系结构设计及其在数据中心和云计算的应用OS-awareBranchPredictorPhilosophy1:employssplitcorrelationhistoryProcessorStatusRegisterexecutionmodebitK-BHSRibitsBHTof2'EntriesU-BHSRibitsbranchaddressibitsGsharewithOS-awarePhilosophy1Employs Split Correlation History20
高级计算机体系结构设计及其在数据中心和云计算的应用 OS-aware Branch Predictor – Philosophy 1: employs split correlation history K-BHSR execution mode bit Processor Status Register 20 branch address X O R i bits i bits i bits . . BHT of 2i Entries prediction U-BHSR . Gshare with OS-aware Philosophy 1 - Employs Split Correlation History