complexity effec ve mul core cache coherence mcc2012
play

Complexity-Effec/ve Mul/core Cache Coherence MCC2012 - PowerPoint PPT Presentation

Complexity-Effec/ve Mul/core Cache-Coherence Complexity-Effec/ve Mul/core Cache Coherence MCC2012 Stefanos Kaxiras & Alberto Ros 1. Ros &


  1. Complexity-­‑Effec/ve ¡Mul/core ¡Cache-­‑Coherence ¡ Complexity-­‑Effec/ve ¡Mul/core ¡ Cache ¡Coherence ¡ MCC2012 ¡ Stefanos ¡Kaxiras ¡& ¡Alberto ¡Ros ¡ ¡ ¡ 1. ¡Ros ¡& ¡Kaxiras, ¡"Complexity-­‑Effec/ve ¡Mul/core ¡Coherence” ¡ ¡PACT2012 ¡ 2. ¡Kaxiras ¡& ¡Ros ¡"Efficient, ¡Snoopless, ¡System-­‑On-­‑Chip ¡Coherence" ¡IEEE ¡System ¡on ¡Chip ¡ Conference ¡(SOCC) ¡2012 ¡ ¡ ¡ ¡ 11/30/12 ¡ Uppsala ¡University/Uppsala ¡Innova/on ¡ 1 ¡ 1 ¡ 1 ¡

  2. Complexity-­‑Effec/ve ¡Mul/core ¡Cache-­‑Coherence ¡ Coherence ¡ “For ¡any ¡given ¡memory ¡loca0on, ¡at ¡any ¡given ¡moment ¡ in ¡0me, ¡there ¡is ¡either ¡a ¡single ¡core ¡that ¡may ¡write ¡it ¡ (and ¡that ¡may ¡also ¡read ¡it) ¡or ¡some ¡number ¡of ¡cores ¡ that ¡may ¡read ¡it. ¡...” ¡Sorin, ¡Wood, ¡& ¡Hill ¡ • But ¡what ¡does ¡it ¡mean? ¡ • Protocols ¡react ¡immediately ¡to ¡any ¡write ¡to ¡kill ¡all ¡ other ¡cached ¡copies ¡ – Source ¡of ¡significant ¡complexity ¡ à ¡ ¡ ¡ ¡Directories, ¡snooping, ¡broadcasts, ¡… ¡ 11/30/12 ¡ Uppsala ¡University/Uppsala ¡Innova/on ¡ 2 ¡ 2 ¡

  3. Complexity-­‑Effec/ve ¡Mul/core ¡Cache-­‑Coherence ¡ Coherence ¡(cont.) ¡ • Why? ¡ – Coherence ¡must ¡be ¡“invisible” ¡to ¡the ¡memory ¡consistency ¡ model ¡ à ¡coherence ¡must ¡be ¡able ¡to ¡allow ¡SC ¡in ¡the ¡ presence ¡of ¡data ¡races! ¡ DATA RACE FREE DATA RACE Write Thread 1 Thread 1 • But ¡what ¡if ¡we ¡have ¡a ¡weak ¡consistency? ¡ Thread 0 Thread 0 Read Write – Provide ¡SC ¡for ¡DATA-­‑RACE-­‑FREE ¡(DRF) ¡programs ¡[Adve ¡& ¡ Synchronization Hill] ¡ Data Read • Significant ¡simplifica/ons ¡are ¡possible! ¡ Data time time 11/30/12 ¡ Uppsala ¡University/Uppsala ¡Innova/on ¡ 3 ¡ 3 ¡

  4. Complexity-­‑Effec/ve ¡Mul/core ¡Cache-­‑Coherence ¡ Simplifying ¡Coherence ¡ • Many ¡have ¡tried: ¡SARC ¡Coherence ¡(IEEE ¡Micro ¡’10), ¡ DeNovo ¡(PACT’11), ¡SWEL ¡(PACT’11), ¡… ¡ • DRF ¡+ ¡mul/core ¡memory ¡hierarchy ¡(presence ¡of ¡a ¡ large ¡shared ¡last ¡level ¡cache) ¡ • Simplest ¡MULTICORE ¡Coherence: ¡VIPS ¡class ¡of ¡ protocols ¡ – TRULLY: ¡Directoryless, ¡Broadcastless, ¡Snoopless, ¡ Invalida/onless ¡… ¡prac/cally ¡Costless ¡ – Beier ¡than ¡MESI ¡in ¡performance ¡and ¡power ¡ – Sweet ¡spot ¡in ¡the ¡design ¡space, ¡complexity, ¡prac/cality ¡ – Important ¡implica/ons ¡for ¡whole ¡system ¡design ¡ 11/30/12 ¡ Uppsala ¡University/Uppsala ¡Innova/on ¡ 4 ¡ 4 ¡

  5. Complexity-­‑Effec/ve ¡Mul/core ¡Cache-­‑Coherence ¡ Mo/va/on: ¡Why ¡Simplify? ¡ Directory/Snooping ¡Coherence ¡is ¡a ¡ relic ¡ of ¡NUMA/SMP ¡ systems ¡of ¡the ¡past ¡ • Complexity: ¡ – Does ¡not ¡take ¡into ¡account ¡the ¡on-­‑chip ¡memory ¡hierarchy ¡(e.g., ¡ Owned ¡state ¡for ¡$-­‑2-­‑$) ¡ à ¡SHARED ¡LLC ¡cache ¡ – Adheres ¡to ¡a ¡strict ¡coherence ¡defini/on ¡(SC ¡in ¡the ¡presence ¡of ¡ data ¡races) ¡which ¡may ¡not ¡be ¡needed ¡ – MESI ¡is ¡already ¡complex ¡(30+ ¡hidden ¡and ¡stable ¡states) ¡ • any ¡new ¡op/miza/on ¡ à ¡verify ¡from ¡scratch ¡ • but ¡what ¡the ¡heck, ¡we ¡know ¡how ¡to ¡do ¡it ¡… ¡ • Cost ¡(area ¡+ ¡power): ¡ – Directories, ¡indirec/on, ¡… ¡ – Snooping ¡on ¡busses, ¡dual ¡tags, ¡… ¡ 11/30/12 ¡ Uppsala ¡University/Uppsala ¡Innova/on ¡ 5 ¡ 5 ¡

  6. Complexity-­‑Effec/ve ¡Mul/core ¡Cache-­‑Coherence ¡ Mo/va/on: ¡Why ¡Simplify? ¡ • Not ¡a ¡big ¡issue ¡for ¡few ¡fat ¡cores ¡… ¡ • But: ¡a ¡new ¡class ¡of ¡manycores ¡with ¡many ¡simple ¡ cores: ¡GPUs, ¡accelerators, ¡… ¡ – Desire ¡to ¡make ¡them ¡coherent ¡with ¡GP ¡cores ¡on ¡the ¡same ¡ chip ¡(coherent ¡Shared ¡Virtual ¡Memory ¡– ¡cSVM) ¡ – Coherence ¡overhead ¡(area, ¡power) ¡is ¡a ¡big ¡issue ¡ à ¡don’t ¡ want ¡to ¡pay ¡much ¡per ¡core ¡ – Coherence ¡is ¡sporadically ¡needed ¡ à ¡why ¡pay ¡always? ¡ • Simple ¡coherence ¡ à ¡simple ¡memory ¡system ¡& ¡NoC ¡ 11/30/12 ¡ Uppsala ¡University/Uppsala ¡Innova/on ¡ 6 ¡ 6 ¡

  7. Complexity-­‑Effec/ve ¡Mul/core ¡Cache-­‑Coherence ¡ Roadmap ¡ • Mo/va/on: ¡Why ¡Simplify? ¡ • VIPS ¡ ¡ • VIPS-­‑M ¡ • Data ¡Races/Synchroniza/on ¡ • Numbers ¡ • Unique ¡proper/es ¡& ¡Implica/ons ¡ • Conclusions ¡ 11/30/12 ¡ Uppsala ¡University/Uppsala ¡Innova/on ¡ 7 ¡ 7 ¡

  8. Complexity-­‑Effec/ve ¡Mul/core ¡Cache-­‑Coherence ¡ Simplifying ¡Coherence: ¡Write ¡Through ¡ • Write-­‑through ¡protocols ¡are ¡simple ¡ – Only ¡Valid ¡and ¡Invalid ¡states ¡in ¡the ¡caches ¡ – BUT ¡they ¡are ¡terrible ¡because ¡of ¡many ¡write ¡misses ¡ • Most ¡of ¡the ¡write ¡misses ¡due ¡to ¡private ¡data ¡(≈ ¡90%) ¡ ¡ Private Shared 100.0 Percentage of write misses 90.0 80.0 70.0 60.0 50.0 40.0 30.0 20.0 10.0 0.0 Barnes Cholesky FFT FMM LU Ocean Radiosity Raytrace Volrend Water-Nsq Water-Sp Em3d Tomcatv Swaptions x264 Average 11/30/12 ¡ Uppsala ¡University/Uppsala ¡Innova/on ¡ 8 ¡ 8 ¡

  9. Complexity-­‑Effec/ve ¡Mul/core ¡Cache-­‑Coherence ¡ VIPS ¡ • Dynamic ¡write ¡policy ¡in ¡the ¡L1s ¡(private ¡caches, ¡in ¡ general) ¡based ¡on ¡a ¡classifica/on ¡of ¡data ¡to ¡Private/ Shared: ¡ • Write-­‑back ¡(WB) ¡for ¡ Private ¡ lines ¡ – Simple ¡(no ¡coherence ¡required) ¡as ¡in ¡uniprocessors ¡ – Efficient: ¡no ¡extra ¡misses ¡ ¡ • Write-­‑through ¡(WT) ¡for ¡ Shared ¡ lines ¡ – Simple ¡(only ¡two ¡states, ¡ VI) ¡ ¡ – Efficient: ¡WT ¡ à ¡coherence ¡misses ¡ • VIPS: ¡Valid/Invalid ¡Private/Shared ¡ ¡ 11/30/12 ¡ Uppsala ¡University/Uppsala ¡Innova/on ¡ 9 ¡ 9 ¡

  10. Complexity-­‑Effec/ve ¡Mul/core ¡Cache-­‑Coherence ¡ Private/Shared ¡Classifica/on ¡ • Classify ¡data ¡(cache ¡lines) ¡into ¡Private ¡and ¡Shared ¡ – Private ¡are ¡accessed ¡by ¡one ¡core ¡only ¡and ¡DO ¡NOT ¡NEED ¡ COHERENCE ¡ – Shared ¡are ¡(poten/ally) ¡accessed ¡by ¡more ¡than ¡one ¡core ¡ and ¡need ¡coherence ¡ – Not ¡a ¡ temporal ¡classifica/on! ¡but ¡for ¡the ¡life ¡/me ¡of ¡the ¡ program ¡(think ¡of ¡variable ¡declara/on ¡as ¡private ¡or ¡ shared) ¡ – Several ¡ways ¡to ¡do ¡this ¡(we ¡know ¡of ¡6 ¡good ¡ones!) ¡but ¡ here ¡we ¡will ¡discuss ¡only ¡one: ¡ • Page-­‑level ¡classifica/on ¡using ¡the ¡OS ¡and ¡the ¡TLBs ¡ 11/30/12 ¡ Uppsala ¡University/Uppsala ¡Innova/on ¡ 10 ¡ 10 ¡

  11. Complexity-­‑Effec/ve ¡Mul/core ¡Cache-­‑Coherence ¡ Private/Shared ¡Classifica/on ¡(cont.) ¡ • Page-­‑level ¡classifica/on ¡by ¡the ¡OS: ¡ – Used ¡in ¡various ¡contexts ¡(Hardavellas ¡et ¡al., ¡ISCA’09, ¡ NUCA, ¡Cuesta ¡et ¡al., ¡ISCA’11, ¡directory ¡reduc/on) ¡ • Technique: ¡ – Each ¡page ¡(PTE/TLB) ¡has ¡a ¡P/S ¡bit ¡ – The ¡first ¡access ¡of ¡a ¡page ¡by ¡a ¡core ¡sets ¡it ¡to ¡P ¡ – Subsequent ¡accesses ¡by ¡other ¡cores ¡set ¡it ¡to ¡S, ¡interrupt ¡ the ¡single ¡core ¡that ¡first ¡set ¡it ¡to ¡P ¡and ¡correct ¡it ¡ 11/30/12 ¡ Uppsala ¡University/Uppsala ¡Innova/on ¡ 11 ¡ 11 ¡

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend