35
An Exploration of Multi- Core Memory Architectures Presenters: Hemsley Pichardo and Rajeev Verma

An Exploration of Multi- Core Memory Architecturesmeseec.ce.rit.edu/756-projects/fall2013/1-4.pdfAn Exploration of Multi-Core Memory Architectures Presenters: Hemsley Pichardo and

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: An Exploration of Multi- Core Memory Architecturesmeseec.ce.rit.edu/756-projects/fall2013/1-4.pdfAn Exploration of Multi-Core Memory Architectures Presenters: Hemsley Pichardo and

An Exploration of Multi-Core Memory Architectures

Presenters:

Hemsley Pichardoand

Rajeev Verma

Page 2: An Exploration of Multi- Core Memory Architecturesmeseec.ce.rit.edu/756-projects/fall2013/1-4.pdfAn Exploration of Multi-Core Memory Architectures Presenters: Hemsley Pichardo and

Summary• Introduction• Current trend in Multi-Core chip• Tiled Chip Architecture Designs

o Hierarchical, Pipeline and Array• Multi-Core Design Alternatives

o Shrink, Shrink & Merge, Constant Die and Single Chip• Cache Coherence for CMP• Baseline Protocol• Optimization in Cache Coherence• CoCCA Architecture and Protocol (CoCCA: Co-designed Coherent Cache Architecture.)

• CoCCA Pattern Table• CoCCA Home Node management • CoCCa Transaction Message model

Page 3: An Exploration of Multi- Core Memory Architecturesmeseec.ce.rit.edu/756-projects/fall2013/1-4.pdfAn Exploration of Multi-Core Memory Architectures Presenters: Hemsley Pichardo and

Introduction

• Designers are turning to multi-core system on chips.

• Doing so in order to counteract problems encountered during advances in today’s microprocessors.o Increased clock rateso Complex designso Interconnectso Power limitso Cache sharing (coherence)o Networking issues

Page 4: An Exploration of Multi- Core Memory Architecturesmeseec.ce.rit.edu/756-projects/fall2013/1-4.pdfAn Exploration of Multi-Core Memory Architectures Presenters: Hemsley Pichardo and

Current Technologies• First : Pure Logic Technology

o Basic transistor is a low threshold device that can switch quickly, and use the natural 6-transistor SRAM that can be built out of it as the memory basis.

• Second : DRAM based which is called “embedded DRAM” (EDRAM)o Higher density, but slower access than SRAM.

• Third : Pure DRAM technology o Where the basic transistor is a higher threshold device that does not

leak as much. o This is important when the data is being stored in a capacitor.

Page 5: An Exploration of Multi- Core Memory Architecturesmeseec.ce.rit.edu/756-projects/fall2013/1-4.pdfAn Exploration of Multi-Core Memory Architectures Presenters: Hemsley Pichardo and

Current Technologies

Variations in Memory Technology

Page 6: An Exploration of Multi- Core Memory Architecturesmeseec.ce.rit.edu/756-projects/fall2013/1-4.pdfAn Exploration of Multi-Core Memory Architectures Presenters: Hemsley Pichardo and

DESIGN CONSTRAINTS AND OVERHEADS

Technology Curves Including Overhead

Page 7: An Exploration of Multi- Core Memory Architecturesmeseec.ce.rit.edu/756-projects/fall2013/1-4.pdfAn Exploration of Multi-Core Memory Architectures Presenters: Hemsley Pichardo and

Tiled Chip Architectural Designs• Three type of emerging architectures.

Page 8: An Exploration of Multi- Core Memory Architecturesmeseec.ce.rit.edu/756-projects/fall2013/1-4.pdfAn Exploration of Multi-Core Memory Architectures Presenters: Hemsley Pichardo and

Hierarchical Designs• Multiple cores share multiple caches in tree-like configurations, with the

caches at each level of higher capacity than the prior level.

• This all means that the off-chip bandwidth must increase proportionately to the product of number of cores (density) and local clock rate.

• Root “cache” having the final off-chip connection to external memory.

• If all cores are arranged to appear as a single integrated SMP node, then this bandwidth increases only with clock rate.

Page 9: An Exploration of Multi- Core Memory Architecturesmeseec.ce.rit.edu/756-projects/fall2013/1-4.pdfAn Exploration of Multi-Core Memory Architectures Presenters: Hemsley Pichardo and

Pipelined Designs• High speed data enters from one chip, and passes successively through

different cores, where at each core some different processing step is performed.

• Increasing the local clock rate decreases the number of cores needed for a pipeline, increasing the area available for additional

pipelines.

• Processed data leaves the last core to proceed off chip.

• Increasing the number of pipelines increases the number of I/O ports linearly,

Page 10: An Exploration of Multi- Core Memory Architecturesmeseec.ce.rit.edu/756-projects/fall2013/1-4.pdfAn Exploration of Multi-Core Memory Architectures Presenters: Hemsley Pichardo and

Array Designs• The on-chip memory is physically divided into separate banks, with processing

logic nestled next to that logic.

• Common interconnect and control logic is often centralized and provides overall synchronization and interaction.

• For some designs, the off-chip bandwidth needs are relatively independent of the number of cores.

• Other designs have the bandwidth needs varying more like the surface area” of the array of nodes, rather than the “volume” or total number of nodes.

Page 11: An Exploration of Multi- Core Memory Architecturesmeseec.ce.rit.edu/756-projects/fall2013/1-4.pdfAn Exploration of Multi-Core Memory Architectures Presenters: Hemsley Pichardo and

Multi-Core Design Alternatives1. Shrink• Assumes constant chip contents but advancing technology.2. Shrink & Merge• Similar to 1• Conversion of SRAM to DRAM• Integration of off-chip memories with on-chip DRAM3. Constant Die• Same as 2• Die size constant• Basic architecture constant• Increases number of cores to fill die4. Single Chip• Combines memory and cores in ways to reduce overhead structures• Maintains constant storage/performance ratio

Page 12: An Exploration of Multi- Core Memory Architecturesmeseec.ce.rit.edu/756-projects/fall2013/1-4.pdfAn Exploration of Multi-Core Memory Architectures Presenters: Hemsley Pichardo and

Multi-Core Design Results : Shrink

Page 13: An Exploration of Multi- Core Memory Architecturesmeseec.ce.rit.edu/756-projects/fall2013/1-4.pdfAn Exploration of Multi-Core Memory Architectures Presenters: Hemsley Pichardo and

Multi-Core Design Results : Shrink & Merge

Page 14: An Exploration of Multi- Core Memory Architecturesmeseec.ce.rit.edu/756-projects/fall2013/1-4.pdfAn Exploration of Multi-Core Memory Architectures Presenters: Hemsley Pichardo and

Multi-Core Design Results : Constant Die

Page 15: An Exploration of Multi- Core Memory Architecturesmeseec.ce.rit.edu/756-projects/fall2013/1-4.pdfAn Exploration of Multi-Core Memory Architectures Presenters: Hemsley Pichardo and

Multi-Core Design Results : Single Chip

Page 16: An Exploration of Multi- Core Memory Architecturesmeseec.ce.rit.edu/756-projects/fall2013/1-4.pdfAn Exploration of Multi-Core Memory Architectures Presenters: Hemsley Pichardo and

Cache coherence for CMP Architecture• Embedded Applications: image, video, data stream and workflow

processings

• These applications tend to access data in pattern.

• These patterns can be used to optimize the cache coherency protocol, by prefetching data and reducing the number of memory transactions.

• A scalable network (Network on Chip, NoC) usually based on a mesh topology is used to connect these cores.

Page 17: An Exploration of Multi- Core Memory Architecturesmeseec.ce.rit.edu/756-projects/fall2013/1-4.pdfAn Exploration of Multi-Core Memory Architectures Presenters: Hemsley Pichardo and

Cache coherence for CMP Architecture cont.• Cache coherence is either directly managed by the programmer or falls

under the control of a cache coherence unit (usually hardware based).

• Coherence issue occurs when

o Data are replicated on different cache memories of cores, due toconcurrent read and write operations.

o Copies of a variable can be present in multiple caches.o A write by one processor may not become visible to others:

Page 18: An Exploration of Multi- Core Memory Architecturesmeseec.ce.rit.edu/756-projects/fall2013/1-4.pdfAn Exploration of Multi-Core Memory Architectures Presenters: Hemsley Pichardo and

Baseline Protocol• Basic solution for coherence• In order to maintain consistency, one popular approach is to use a four-

state, directory-based cache coherence protocol.

Page 19: An Exploration of Multi- Core Memory Architecturesmeseec.ce.rit.edu/756-projects/fall2013/1-4.pdfAn Exploration of Multi-Core Memory Architectures Presenters: Hemsley Pichardo and

Baseline Protocol cont.● The coherence state field represents four states (MESI)

○ M (modified): a single valid copy exists across the whole system; the core owning this copy is called Owner

○ E (exclusive): a single valid copy exists across the whole system, the core owning this copy is named the Owner

○ S (shared): multiple copies of the data exist, all copy are in read•only mode. Any associated core is named Sharer.

○ I (invalid): the copy is currently invalid, should not be used and so will be discarded.

Page 20: An Exploration of Multi- Core Memory Architecturesmeseec.ce.rit.edu/756-projects/fall2013/1-4.pdfAn Exploration of Multi-Core Memory Architectures Presenters: Hemsley Pichardo and

Optimization in cache coherence

• Working on columns in a picture can be achieved with the help of data access patterns.

• Patterns can be used to speculate on the next accesses, prefetching data where they will be most likely used in a near future.

• Patterns can also be used to save bandwidth, by reducing the number of protocol messages: one transaction can provide access to a whole set of data.

• Thats how CoCCA come into picture.

• CoCCA : Co-designed Coherent Cache Architecture.

Page 21: An Exploration of Multi- Core Memory Architecturesmeseec.ce.rit.edu/756-projects/fall2013/1-4.pdfAn Exploration of Multi-Core Memory Architectures Presenters: Hemsley Pichardo and

CoCCA Architecture and ProtocolPrinciples and motivation:●CoCCA provides support for managing regular memory access pattern.●CoCCA uses “speculative message” to manage the pattern.●CoCCA uses a hardware component which:

○ store pattern ○ control transactions.

●Requester needs to send speculative message to Hybrid Home node(HHN), if matches.

●Otherwise, requester sends baseline message to baseline Home Node (BHN).

●Advantages:○ Reduction of throughput○ Lower time of memory access.

Page 22: An Exploration of Multi- Core Memory Architecturesmeseec.ce.rit.edu/756-projects/fall2013/1-4.pdfAn Exploration of Multi-Core Memory Architectures Presenters: Hemsley Pichardo and

●CoCCA Architecture and ProtocolPrinciple

Page 23: An Exploration of Multi- Core Memory Architecturesmeseec.ce.rit.edu/756-projects/fall2013/1-4.pdfAn Exploration of Multi-Core Memory Architectures Presenters: Hemsley Pichardo and

CoCCA Architecture and ProtocolRoles of a core:

•Requester: The core asking for data.

•Home Node: The core which is in charge of tracking the coherenceinformation of a given data in system.

•Sharer: A core which has copy of the data in its cache in “shared mode”. Multiple copies of this data can exist on other cores.

•Owner : Core which has a “Exclusive” or “Modified” copy of the data in its cache. Only one copy of this data can be exist in whole system.

Page 24: An Exploration of Multi- Core Memory Architecturesmeseec.ce.rit.edu/756-projects/fall2013/1-4.pdfAn Exploration of Multi-Core Memory Architectures Presenters: Hemsley Pichardo and

CoCCA Pattern Table

● Patterns are used to get the data according to spatial locality.

● A “trigger” is used to get a specific signature of a pattern. The signature could be base address.

Baseaddress: The address of first cache line of the pattern

Size: No of elementsStride: distance between two excess patterns

Page 25: An Exploration of Multi- Core Memory Architecturesmeseec.ce.rit.edu/756-projects/fall2013/1-4.pdfAn Exploration of Multi-Core Memory Architectures Presenters: Hemsley Pichardo and

CoCCA Pattern Table Cont.• The pattern descriptor enables to describe the CoCCA pattern table entry

• Desc the pattern descriptor that results from applying function fn() with the given parameters.

• Example pattern table in c:

• PatternNew(), PatternAddLength(), PatternAddStride() etc can support to up

Page 26: An Exploration of Multi- Core Memory Architecturesmeseec.ce.rit.edu/756-projects/fall2013/1-4.pdfAn Exploration of Multi-Core Memory Architectures Presenters: Hemsley Pichardo and

CoCCA Pattern Table Cont.C Functions used to update the pattern table.•PatternNew(): function to create a pattern,

•PatternAddOffset(): function to add an offset entry,

•PatternAddLength(): function to add a length entry,

•PatternAddStride(): function to add a stride entry,

•PatternFree(): function to release the pattern after use.

Page 27: An Exploration of Multi- Core Memory Architecturesmeseec.ce.rit.edu/756-projects/fall2013/1-4.pdfAn Exploration of Multi-Core Memory Architectures Presenters: Hemsley Pichardo and

CoCCA: Protocol and Home Node managementCharacteristics of Hybrid architecture:

•Difference between baseline and speculative messages,

•Speculative messages that permit to read all addresses of pattern through their base address,

•Requests of speculative messages by page granularity,

•Round-Robin method to choose the Home Node (HN).

•Still use the Home Node (HN) for message management.

•Always the initial step is to determine the HN for the requested data.

• The coherence information about this data is kept in extra storage which is called “Coherence Directory”.

•Authors use line granularity to determine HN and page granularity for CoCCA protocol

Page 28: An Exploration of Multi- Core Memory Architecturesmeseec.ce.rit.edu/756-projects/fall2013/1-4.pdfAn Exploration of Multi-Core Memory Architectures Presenters: Hemsley Pichardo and

CoCCA: Transaction Message ModelRead Transaction message

Page 29: An Exploration of Multi- Core Memory Architecturesmeseec.ce.rit.edu/756-projects/fall2013/1-4.pdfAn Exploration of Multi-Core Memory Architectures Presenters: Hemsley Pichardo and

CoCCA: Transaction Message Model• Comparison between Baseline and Pattern based approach

Page 30: An Exploration of Multi- Core Memory Architecturesmeseec.ce.rit.edu/756-projects/fall2013/1-4.pdfAn Exploration of Multi-Core Memory Architectures Presenters: Hemsley Pichardo and

CODE INSTRUMENTATION AND FIRST EVALUATION• Application used : a cascading convolution filter: it is very typical of image

processing or preprocessing. • Source and destination images have a resolution of 640x480• The CMP architecture is chosen as a 7x7 processor matrix, each with

256KB of L2 cache.

Page 31: An Exploration of Multi- Core Memory Architecturesmeseec.ce.rit.edu/756-projects/fall2013/1-4.pdfAn Exploration of Multi-Core Memory Architectures Presenters: Hemsley Pichardo and

CoCCA : Instrumentation● The Pin/Pintool software is used to extract shared data read and write for

each core.● “inscount” pintools instruments a program to count the number of

instructions executed.● We can also modify the API to get core wise instructions count.● Example:

Page 32: An Exploration of Multi- Core Memory Architecturesmeseec.ce.rit.edu/756-projects/fall2013/1-4.pdfAn Exploration of Multi-Core Memory Architectures Presenters: Hemsley Pichardo and

CoCCA: Approach to patterns

Page 33: An Exploration of Multi- Core Memory Architecturesmeseec.ce.rit.edu/756-projects/fall2013/1-4.pdfAn Exploration of Multi-Core Memory Architectures Presenters: Hemsley Pichardo and

CoCCA : Results and Conclusions• Result by periodic execution of the program:

• 37% of the reduction of message throughput.• A new hardware component is also being introduced which can be used

to store and retrieve pattern • On the benchmark, the evaluation shows a performance boost of over 60%

Page 34: An Exploration of Multi- Core Memory Architecturesmeseec.ce.rit.edu/756-projects/fall2013/1-4.pdfAn Exploration of Multi-Core Memory Architectures Presenters: Hemsley Pichardo and

�Questions??

Page 35: An Exploration of Multi- Core Memory Architecturesmeseec.ce.rit.edu/756-projects/fall2013/1-4.pdfAn Exploration of Multi-Core Memory Architectures Presenters: Hemsley Pichardo and

�Thank you!