Data prefetching techniques in computer systems ebook pdf

Page 1

Data Prefetching Techniques in Computer Systems - eBook PDF

Visit to download the full and correct content document: https://ebooksecure.com/download/data-prefetching-techniques-in-computer-systems -ebook-pdf/

ADVANCESIN COMPUTERS

DataPrefetchingTechniques inComputerSystems

VOLUMEONEHUNDREDANDTWENTYFIVE

This page intentionally left blank

ADVANCESIN COMPUTERS

DataPrefetchingTechniques inComputerSystems

SchoolofComputerScience, InstituteforResearchinFundamentalSciences(IPM), Tehran,Iran

HAMIDSARBAZI-AZAD

SharifUniversityofTechnology,and InstituteforResearchinFundamentalSciences(IPM), Tehran,Iran

VOLUMEONEHUNDREDANDTWENTYFIVE

AcademicPressisanimprintofElsevier

50HampshireStreet,5thFloor,Cambridge,MA02139,UnitedStates 525BStreet,Suite1650,SanDiego,CA92101,UnitedStates

TheBoulevard,LangfordLane,Kidlington,OxfordOX51GB,UnitedKingdom 125LondonWall,London,EC2Y5AS,UnitedKingdom

Firstedition2022

Copyright©2022ElsevierInc.Allrightsreserved.

Nopartofthispublicationmaybereproducedortransmittedinanyformorbyanymeans,electronic ormechanical,includingphotocopying,recording,oranyinformationstorageandretrievalsystem, withoutpermissioninwritingfromthepublisher.Detailsonhowtoseekpermission,further informationaboutthePublisher’spermissionspoliciesandourarrangementswithorganizationssuch astheCopyrightClearanceCenterandtheCopyrightLicensingAgency,canbefoundatourwebsite: www.elsevier.com/permissions

Thisbookandtheindividualcontributionscontainedinitareprotectedundercopyrightbythe Publisher (otherthanasmaybenotedherein).

Notices

Knowledgeandbestpracticeinthisfieldareconstantlychanging.Asnewresearchandexperience broadenourunderstanding,changesinresearchmethods,professionalpractices,ormedical treatmentmaybecomenecessary.

Practitionersandresearchersmustalwaysrelyontheirownexperienceandknowledgeinevaluating andusinganyinformation,methods,compounds,orexperimentsdescribedherein.Inusingsuch informationormethodstheyshouldbemindfuloftheirownsafetyandthesafetyofothers,including partiesforwhomtheyhaveaprofessionalresponsibility.

Tothefullestextentofthelaw,neitherthePublishernortheauthors,contributors,oreditors,assume anyliabilityforanyinjuryand/ordamagetopersonsorpropertyasamatterofproductsliability, negligenceorotherwise,orfromanyuseoroperationofanymethods,products,instructions,orideas containedinthematerialherein.

ISBN:978-0-323-85119-0 ISSN:0065-2458

ForinformationonallAcademicPresspublications visitourwebsiteat https://www.elsevier.com/books-and-journals

Publisher: Zoe Kruze

DevelopmentalEditor: CindyAngelitaGardose

ProductionProjectManager: JamesSelvam

CoverDesigner: GregHarris

TypesetbySTRAIVE,India

Contents Contributorsvii Preface ix Tableofabbreviationsxi 1.Introductiontodataprefetching1 PejmanLotfi-KamranandHamidSarbazi-Azad 1. Introduction2 2. Background3 3. Apreliminaryhardwaredataprefetcher9 4. Nonhardwaredataprefetching11 5. Conclusion12 References13 Furtherreading15 Abouttheauthors16 2.Spatialprefetching19 PejmanLotfi-KamranandHamidSarbazi-Azad 1. Introduction19 2. Spatialmemorystreaming(SMS)21 3. Variablelengthdeltaprefetcher(VLDP)23 4. Summary27 References27 Abouttheauthors29 3.Temporalprefetching31 PejmanLotfi-KamranandHamidSarbazi-Azad 1. Introduction31 2. Sampledtemporalmemorystreaming(STMS)33 3. Irregularstreambuffer(ISB)35 4. Summary38 References38 Abouttheauthors41 v

4.Beyondspatialortemporalprefetching43

PejmanLotfi-KamranandHamidSarbazi-Azad

1. Introduction43

2. Spatiotemporalmemorystreaming(STeMS)44

3. Summary50 References50

Abouttheauthors52

5.State-of-the-artdataprefetchers55

MehranShakerinava,FatemehGolshan,AliAnsari,PejmanLotfi-Kamran, andHamidSarbazi-Azad

1. DOMINO temporaldataprefetcher55

2. BINGO spatialdataprefetcher57

3. Multi-lookaheadoffsetprefetcher59

4. Runaheadmetadata62

5. Summary64 References64

Abouttheauthors65

6.Evaluationofdataprefetchers69

MehranShakerinava,FatemehGolshan,AliAnsari,PejmanLotfi-Kamran, andHamidSarbazi-Azad

1. Introduction70

2. Spatialprefetching70

3. Temporalprefetching73

4. Spatio-temporalprefetching77

5. Offsetprefetching82

6. Multi-degreeprefetchingwithpairwise-correlatingprefetchers83

7. Summary85 References85

Abouttheauthors87

vi Contents

Contributors

AliAnsari

SharifUniversityofTechnology,Tehran,Iran

FatemehGolshan

SharifUniversityofTechnology,Tehran,Iran

PejmanLotfi-Kamran

SchoolofComputerScience,InstituteforResearchinFundamentalSciences(IPM),Tehran, Iran

HamidSarbazi-Azad

SharifUniversityofTechnology,andInstituteforResearchinFundamentalSciences(IPM), Tehran,Iran

MehranShakerinava

SharifUniversityofTechnology,Tehran,Iran

vii

This page intentionally left blank

Preface

AdvancesinComputers,theoldestseriestothechronicleoftherapid evolutionofcomputing,annuallypublishesseveralvolumes,eachcomprisingtypicallyfourtoeightchapters,describingnewfindingsanddevelopmentsinthetheoryandapplicationsofcomputing.

This125thvolumeisathematiconeentitled“DataPrefetching TechniquesinComputerSystems”inspiredbyrecentworkindataprefetching techniquesproposedforadvancedprocessorsandusedincomputersystems. Thisvolumecomprisessixchapters.

Whileprocessorperformancehasbeenrapidlyimprovingduringthepast decades,themaingoalofdesignerswastoincreasethecapacityofthemain memoryratherthanitsspeed.Therefore,thereemergedaconsiderablegap, calledmemorywall,betweenthespeedoftheprocessorandmainmemory.

Totacklethememorywallproblem,ahigh-speedlow-capacitybuffercalled cachememoryisusedbetweentheprocessorandthemainmemorytoremedytheirperformancegap.Whenaprocessorrequiresapieceofdata,ifitis inthecache(calledahit),itcanbedeliveredtotheprocessorveryquickly. Otherwise,whichiscalledamiss,thedatahastobeaccessedinthemain memory.Insuchcases,cachememoryisnotusefulandevenincreases theaccesslatencyaswefirstneedtosearchthecacheandthenaccessthe mainmemory.Asthemainmemorylatencyisconsiderableforaprocessor, loweringtherequestsservedbythememoryisdesirable.Dataprefetchingis awaytoimprovetheeffectivenessofcachesandreducestheperformance gapbetweentheprocessorandthemainmemorybyloweringthestall cyclesseenbytheprocessorwhenservingmainmemoryrequests.Adata prefetcherpredictsthatapieceofdataisgoingtobeusedbytheprocessor. Incasethepredicteddataisnotinthecache,thedataprefetcherbringsitinto thecacheinadvance.

Themaintaskofadataprefetcheristopredictfuturememoryaccesses. Fortunately,thememoryaccessesofaprocessorusuallyareregularand followpatterns.Bylearningaccesspatterns,adataprefetchercanmake correctpredictions.Basedondifferentaccesspatternsthatadataprefetcher canlearn,differenttypesofdataprefetchersmaybedesignedandused.This bookintroducesseveralimportanttypesofdataprefetchersanddiscusses howtheyperformdataprefetching,whytheyworkasintended,whenthey areeffective,andwhentheyarenot.

ix

Inthisbook,wefirstdiscussthebasicdefinitionsandfundamentalconceptsofdataprefetchingandthenstudyclassichardwaredataprefetchers,as wellasrecentadvanceddataprefetchers.Wedescribetheoperationsofevery dataprefetcherindetailandshedlightonitsdesigntrade-offs.

Thesixchaptersofthebookareorganizedasfollows: Chapter1,an introductiontodataprefetchingisgiven.Differentprefetchersaredefined andmanyrecentprefetchersarecategorizedaswell. Chapter2 discusses spatialprefetchingtechniquesandintroducesSMSandVLDPtechniques indetail. Chapter3 discussestemporaldataprefetchingandexplains STMSandISB.Techniquesthatcannotbeclassifiedunderonlyspatial andtemporaldataprefetchersareconsideredin Chapter4. Chapter5 introducessomerecentlyproposeddataprefetchers.Finally, Chapter6 evaluates theeffectivenessofdifferentprefetchersundervariousworkingconditions.

Wehopethatthereaderswillfindthisvolumeinterestinganduseful forteaching,research,anddesigningdataprefetchers.Wewelcomeany feedbackandsuggestionsrelatedtothebook.

PEJMAN LOTFI-KAMRAN

SchoolofComputerScience

InstituteforResearchinFundamentalSciences(IPM)

Tehran,Iran

HAMID SARBAZI-AZAD

SharifUniversityofTechnology, and

InstituteforResearchinFundamentalSciences(IPM), Tehran,Iran

x Preface

Tableofabbreviations

AMT accessmaptable

BOP best-offsetprefetcher

CPU centralprocessingunit

DHB deltahistorybuffer

DPC dataprefetchingchampionship

DPT deltapredictiontable

DRAM dynamicrandomaccessmemory

DSS decisionsupportsystem

EIT enhancedindextable

GPU graphicsprocessingunit

IPC instructionspercycle

ISB irregularstreambuffer

L1D level1data

LLC last-levelcache

LRU leastrecentlyused

MLOP multi-lookaheadoffsetprefetcher

NVM non-volatilememory

OLTP onlinetransactionprocessing

OoO outoforder

OPT offsetpredictiontable

OS operatingsystem

PAS physicaladdressspace

PC programcounter

PHT patternhistorytable

PSAM physical-to-structuraladdressmapping

PST patternssequencetable

RMD runaheadmetadata

RMOB regionmissorderbuffer

ROB reorderbuffer

RRT recentrequeststable

SAS structuraladdressspace

SMS spatialmemorystreaming

SP sandboxprefetcher

SPAM structural-to-physicaladdressmapping

SPU sandboxprefetchunit

STeMS spatio-temporalmemorystreaming

STMS sampledtemporalmemorystreaming

TLB translationlookasidebuffer

TPC transactionprocessingperformancecouncil

VLDP variablelengthdeltaprefetcher

xi

This page intentionally left blank

’slawtosignificantly improvethespeedofprocessors.Unlikeprocessors,withthemainmemory,thefocus ofimprovementhasbeencapacityandnotaccesstime.Hence,thereisalargegap betweenthespeedofprocessorsandmainmemory.Tohidethegap,ahierarchyof cacheshasbeenusedbetweenaprocessorandmainmemory.Whilecachesproved tobequiteeffective,theireffectivenessdirectlydependsonhowmanytimesa requestedpieceofdatacanbefoundinthecache.Duetothecomplexityofdataaccess patterns,onmanyoccasions,therequestedpieceofdatacannotbefoundinthecache hierarchy,whichexposeslargedelaystoprocessorsandsignificantlydegradestheirperformance.Dataprefetchingisthescienceandartofpredicting,inadvance,whatpieces ofdataaprocessorneedsandbringingthemintothecachebeforetheprocessor requeststhem.Inthischapter,wejustifytheimportanceofdataprefetching,lookat ataxonomyofdataprefetching,andbrieflydiscusssomesimplewaystodoprefetching.

AdvancesinComputers,Volume125Copyright # 2022ElsevierInc.

ISSN0065-2458Allrightsreserved.

https://doi.org/10.1016/bs.adcom.2021.11.003

CHAPTERONE
PejmanLotfi-Kamrana andHamidSarbazi-Azadb aSchoolofComputerScience,InstituteforResearchinFundamentalSciences(IPM),Tehran,Iran bSharifUniversityofTechnology,andInstituteforResearchinFundamentalSciences(IPM),Tehran,Iran Contents 1. Introduction2 2. Background3 2.1 Predictingmemoryreferences 3 2.2 Prefetchinglookahead 6 2.3 Locationofdataprefetcher 7 2.4 Prefetchinghazards 7 2.5 Prefetchertypes 8 3. Apreliminaryhardwaredataprefetcher 9 4. Nonhardwaredataprefetching 11 5. Conclusion 12 References 13 Furtherreading 15 Abouttheauthors 16 Abstract Formanyyears,computerdesignersbenefittedfromMoore
Introductiontodataprefetching
1

Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.