eecc722 - shaaban #1 lec # 4 fall 2011 9-14-2011 smt issues smt cpu performance gain potential....

33
EECC722 - Shaaban EECC722 - Shaaban #1 Lec # 4 Fall 2011 9-14-2 SMT Issues SMT Issues SMT CPU performance gain potential. Modifications to Superscalar CPU architecture necessary to support SMT. SMT performance evaluation vs. Fine-grain multithreading Superscalar, Chip Multiprocessors. Hardware techniques to improve SMT performance: Optimal level one cache configuration for SMT. SMT thread instruction fetch, issue policies. Instruction recycling (reuse) of decoded instructions. Software techniques: Compiler optimizations for SMT. Software-directed register deallocation. Operating system behavior and optimization. SMT support for fine-grain synchronization. SMT as a viable architecture for network processors. An SMT implementation: Intel’s Hyper-Threading (2-way SMT) Microarchitecture and performance in compute-intensive workloads. SMT-7 SMT-8 SMT-9

Post on 20-Dec-2015

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: EECC722 - Shaaban #1 Lec # 4 Fall 2011 9-14-2011 SMT Issues SMT CPU performance gain potential. Modifications to Superscalar CPU architecture necessary

EECC722 - ShaabanEECC722 - Shaaban#1 Lec # 4 Fall 2011 9-14-2011

SMT IssuesSMT Issues• SMT CPU performance gain potential.• Modifications to Superscalar CPU architecture necessary to support SMT.• SMT performance evaluation vs. Fine-grain multithreading Superscalar, Chip

Multiprocessors.• Hardware techniques to improve SMT performance:

– Optimal level one cache configuration for SMT.– SMT thread instruction fetch, issue policies.– Instruction recycling (reuse) of decoded instructions.

• Software techniques:– Compiler optimizations for SMT.– Software-directed register deallocation.– Operating system behavior and optimization.

• SMT support for fine-grain synchronization.• SMT as a viable architecture for network processors.• An SMT implementation: Intel’s Hyper-Threading (2-way SMT) Microarchitecture and

performance in compute-intensive workloads.

SMT-7

SMT-8 SMT-9

Page 2: EECC722 - Shaaban #1 Lec # 4 Fall 2011 9-14-2011 SMT Issues SMT CPU performance gain potential. Modifications to Superscalar CPU architecture necessary

EECC722 - ShaabanEECC722 - Shaaban#2 Lec # 4 Fall 2011 9-14-2011

Operating System Impact on SMT ArchitectureOperating System Impact on SMT Architecture• The work published in “An Analysis of Operating System Behavior on a

Simultaneous Multithreaded Architecture”, Josh Redstone et al. , in Proceedings of the 9th International Conference on Architectural Support for Programming Languages and Operating Systems, November 2000. (SMT-7) represents the first study of OS execution on a simulated SMT processor.

• The SimOS environment adapted for SMT:

– Alpha-based SMT CPU core added.

– Digital Unix 4.0d modified to support SMT.

• Study goals:

– Compare SMT/OS performance results with previous SMT performance results that do not account for OS behavior and impact.

– Contrast OS impact between OS intensive and non OS intensive workloads.

• Two types of workloads selected for the study:

– Non OS intensive workload: Multiprogrammed 8 SPECInt95 benchmarks .

– OS intensive workload: Multi-threaded Apache web server (64 server processes), driven by the SPECWeb benchmark (128 clients).

• No SMT-specific OS optimizations were investigated in this study.

SMT-7

1

2

Page 3: EECC722 - Shaaban #1 Lec # 4 Fall 2011 9-14-2011 SMT Issues SMT CPU performance gain potential. Modifications to Superscalar CPU architecture necessary

EECC722 - ShaabanEECC722 - Shaaban#3 Lec # 4 Fall 2011 9-14-2011

OS (Kernel) Code Vs. User CodeOS (Kernel) Code Vs. User Code

• Operating systems usually have large working sets that can overwhelm the cache and TLB due to code and data size.

• Operating systems may negatively impact branch prediction performance, because of frequent branches and infrequent loops.

• OS execution is often brief and intermittent, invoked by interrupts, exceptions, or system calls, and can cause the replacement of useful cache, TLB and branch prediction state for little or no benefit.

• The OS may perform spin-waiting, explicit cache/TLB invalidation, and other operations not common in user-mode code.

1

2

3

4

Page 4: EECC722 - Shaaban #1 Lec # 4 Fall 2011 9-14-2011 SMT Issues SMT CPU performance gain potential. Modifications to Superscalar CPU architecture necessary

EECC722 - ShaabanEECC722 - Shaaban#4 Lec # 4 Fall 2011 9-14-2011

SimOSSimOS• SimOS is a complete machine simulation environment developed at Stanford

(http://simos.stanford.edu/).

• Designed for the efficient and accurate study of both uniprocessor and multiprocessor computer systems.

• Simulates computer hardware in enough detail to boot and run commercial operating systems.

• SimOS currently provides CPU models of the MIPS R4000 and R10000 and Digital Alpha processor families.

• In addition to the CPU, SimOs also models caches, multiprocessor memory busses, disk drives, ethernet, consoles, and other system devices.

• SimOs has been ported for IRIX versions 5.3 (32-bit) and 6.4 (64-bit) and Digital UNIX; a port of Linux for the Alpha and X86 is being developed.

Page 5: EECC722 - Shaaban #1 Lec # 4 Fall 2011 9-14-2011 SMT Issues SMT CPU performance gain potential. Modifications to Superscalar CPU architecture necessary

EECC722 - ShaabanEECC722 - Shaaban#5 Lec # 4 Fall 2011 9-14-2011

SimOS System DiagramSimOS System Diagram

SimOS

Alpha CPU model SMT-modified to support 8 threads

SMT-7

Page 6: EECC722 - Shaaban #1 Lec # 4 Fall 2011 9-14-2011 SMT Issues SMT CPU performance gain potential. Modifications to Superscalar CPU architecture necessary

EECC722 - ShaabanEECC722 - Shaaban#6 Lec # 4 Fall 2011 9-14-2011

A Base SMT hardware Architecture.

Source: Exploiting Choice: Instruction Fetch and Issue on an Implementable Simultaneous Multithreading Processor,

Dean Tullsen et al. Proceedings of the 23rd Annual International Symposium on Computer Architecture, May 1996, pages 191-202.

Page 7: EECC722 - Shaaban #1 Lec # 4 Fall 2011 9-14-2011 SMT Issues SMT CPU performance gain potential. Modifications to Superscalar CPU architecture necessary

EECC722 - ShaabanEECC722 - Shaaban#7 Lec # 4 Fall 2011 9-14-2011

Simulated Alpha-based Simulated Alpha-based 8-way (thread) 8-issue SMT 8-way (thread) 8-issue SMT

Processor ParametersProcessor Parameters

• Duplicate the register file, program counter, subroutine stack and internal processor registers of a superscalar CPU to hold the state of multiple threads.

• Add per-context mechanisms for pipeline flushing, instruction retirement, subroutine return prediction, and trapping.

• Fetch unit, Functional units, Data L1, L2, TLB shared among contexts.

• ~ 10% chip-area increase over superscalar. (compared to ~ 5% for 2-way SMT Intel’s hyper-threaded P4/Xeon)

SMT-7

Page 8: EECC722 - Shaaban #1 Lec # 4 Fall 2011 9-14-2011 SMT Issues SMT CPU performance gain potential. Modifications to Superscalar CPU architecture necessary

EECC722 - ShaabanEECC722 - Shaaban#8 Lec # 4 Fall 2011 9-14-2011

OS Modifications for SMTOS Modifications for SMTOnly minimal required OS modifications to support SMT considered

(no OS optimizations for SMT considered here):• OS task scheduler must support multiple threads in running status:

– Shared-memory multiprocessor (SMP) aware OS (including Digital Unix) has this ability but each thread runs on a different physical CPU in SMP systems.

– An SMT processor reports to such an OS as multiple shared memory CPUs (logical processors).

• TLB-related code must be modified:

– Mutual exclusion support to access to address space number (ASN) tags of the TLB by multiple threads simultaneously.

– Modified ASN assignment to account for the presence of multiple threads.

– Internal CPU registers used to modify TLB entries replicated per context.

• No OS changes required to account for the shared L1 cache of SMT vs. the non shared L1 for SMP.

SMT-7

Page 9: EECC722 - Shaaban #1 Lec # 4 Fall 2011 9-14-2011 SMT Issues SMT CPU performance gain potential. Modifications to Superscalar CPU architecture necessary

EECC722 - ShaabanEECC722 - Shaaban#9 Lec # 4 Fall 2011 9-14-2011

SPECInt95 Workload Execution Cycle SPECInt95 Workload Execution Cycle BreakdownBreakdown

• Percentage of execution cycles for OS Kernel instructions:– During program startup: 18%, mostly due to data TLB misses and

to a lesser extent system calls.– Steady state: 5% still dominated by TLB misses.

“An Analysis of Operating System Behavior on a Simultaneous Multithreaded Architecture”, Josh Redstone et al. , in Proc. of the 9th Int. Conf. on Architectural Support for Programming Languages and Operating Systems, Nov. 2000

SMT-7

Steady StateStart-up

5% of busy time user

95% of busy time Kernel

Selected to represent non OS intensive workloads

Non OS-Intensive Workload

Page 10: EECC722 - Shaaban #1 Lec # 4 Fall 2011 9-14-2011 SMT Issues SMT CPU performance gain potential. Modifications to Superscalar CPU architecture necessary

EECC722 - ShaabanEECC722 - Shaaban#10 Lec # 4 Fall 2011 9-14-2011

Breakdown of Kernel Time for Breakdown of Kernel Time for SPECInt95SPECInt95

5% dominated by TLB misses.

18% mostly due to data TLB misses and system calls

“An Analysis of Operating System Behavior on a Simultaneous Multithreaded Architecture”, Josh Redstone et al. , in Proc. of the 9th Int. Conf. on Architectural Support for Programming Languages and Operating Systems, Nov. 2000

SMT-7

Steady StateStart-up

Page 11: EECC722 - Shaaban #1 Lec # 4 Fall 2011 9-14-2011 SMT Issues SMT CPU performance gain potential. Modifications to Superscalar CPU architecture necessary

EECC722 - ShaabanEECC722 - Shaaban#11 Lec # 4 Fall 2011 9-14-2011

SPEC System Calls PercentageSPEC System Calls Percentage

System calls as a percentage of total execution cycles.

“An Analysis of Operating System Behavior on a Simultaneous Multithreaded Architecture”, Josh Redstone et al. , in Proc. of the 9th Int. Conf. on Architectural Support for Programming Languages and Operating Systems, Nov. 2000

SMT-7

File Read

PAL Code = Privileged Architecture Library code(Exp. handling, TLB miss handling etc.)

Page 12: EECC722 - Shaaban #1 Lec # 4 Fall 2011 9-14-2011 SMT Issues SMT CPU performance gain potential. Modifications to Superscalar CPU architecture necessary

EECC722 - ShaabanEECC722 - Shaaban#12 Lec # 4 Fall 2011 9-14-2011

SPECInt95 Dynamic Instruction MixSPECInt95 Dynamic Instruction Mix

• Percentage of dynamic instructions in the SPECInt workload by instruction type. • The percentages in parenthesis for memory operations represent the proportion of loads and stores that are to physical addresses. • A percentage breakdown of branch instructions is also included.• For conditional branches, the number in parenthesis represents the percentage of conditional branches that are taken.

“An Analysis of Operating System Behavior on a Simultaneous Multithreaded Architecture”, Josh Redstone et al. , in Proc. of the 9th Int. Conf. on Architectural Support for Programming Languages and Operating Systems, Nov. 2000

SMT-7

Page 13: EECC722 - Shaaban #1 Lec # 4 Fall 2011 9-14-2011 SMT Issues SMT CPU performance gain potential. Modifications to Superscalar CPU architecture necessary

EECC722 - ShaabanEECC722 - Shaaban#13 Lec # 4 Fall 2011 9-14-2011

SPECInt95SPECInt95 Total Miss rates & Distribution of Misses

• The miss categories are percentages of all user and kernel misses. • Bold entries signify kernel-induced interference.• User-kernel conflicts are misses in which the user thread conflicted with some type of kernel activity (the kernel executing on behalf of

this user thread, some other user thread, a kernel thread, or an interrupt).

“An Analysis of Operating System Behavior on a Simultaneous Multithreaded Architecture”, Josh Redstone et al. , in Proc. of the 9th Int. Conf. on Architectural Support for Programming Languages and Operating Systems, Nov. 2000

SMT-7

Page 14: EECC722 - Shaaban #1 Lec # 4 Fall 2011 9-14-2011 SMT Issues SMT CPU performance gain potential. Modifications to Superscalar CPU architecture necessary

EECC722 - ShaabanEECC722 - Shaaban#14 Lec # 4 Fall 2011 9-14-2011

Metrics for SPECInt95 with and without the Metrics for SPECInt95 with and without the Operating System for both SMT and SuperscalarOperating System for both SMT and Superscalar

• The maximum issue for integer programs is 6 instructions on the 8-wide SMT, because there are only 6 integer units.

“An Analysis of Operating System Behavior on a Simultaneous Multithreaded Architecture”, Josh Redstone et al. , in Proc. of the 9th Int. Conf. on Architectural Support for Programming Languages and Operating Systems, Nov. 2000

SMT-7

(Steady State)

Page 15: EECC722 - Shaaban #1 Lec # 4 Fall 2011 9-14-2011 SMT Issues SMT CPU performance gain potential. Modifications to Superscalar CPU architecture necessary

EECC722 - ShaabanEECC722 - Shaaban#15 Lec # 4 Fall 2011 9-14-2011

Apache Workload Execution Cycle Apache Workload Execution Cycle BreakdownBreakdown

• Apache experiences little start-up period since Apache’s ‘start-up’ consists simply of receiving the first incoming requests and waking up the server threads.

• Once requests arrive, Apache spends over 75% of its time in the OS kernel.

“An Analysis of Operating System Behavior on a Simultaneous Multithreaded Architecture”, Josh Redstone et al. , in Proc. of the 9th Int. Conf. on Architectural Support for Programming Languages and Operating Systems, Nov. 2000

SMT-7

Selected to representOS intensive workloads

Start up Time?

OS-Intensive Workload

Page 16: EECC722 - Shaaban #1 Lec # 4 Fall 2011 9-14-2011 SMT Issues SMT CPU performance gain potential. Modifications to Superscalar CPU architecture necessary

EECC722 - ShaabanEECC722 - Shaaban#16 Lec # 4 Fall 2011 9-14-2011

Breakdown of kernel time for Apache Breakdown of kernel time for Apache vs. SPECInt95 on SMTvs. SPECInt95 on SMT

“An Analysis of Operating System Behavior on a Simultaneous Multithreaded Architecture”, Josh Redstone et al. , in Proc. of the 9th Int. Conf. on Architectural Support for Programming Languages and Operating Systems, Nov. 2000

SMT-7

57% System Calls

Majority TLB miss handing

Page 17: EECC722 - Shaaban #1 Lec # 4 Fall 2011 9-14-2011 SMT Issues SMT CPU performance gain potential. Modifications to Superscalar CPU architecture necessary

EECC722 - ShaabanEECC722 - Shaaban#17 Lec # 4 Fall 2011 9-14-2011

Apache System Calls By NameApache System Calls By Name

“An Analysis of Operating System Behavior on a Simultaneous Multithreaded Architecture”, Josh Redstone et al. , in Proc. of the 9th Int. Conf. on Architectural Support for Programming Languages and Operating Systems, Nov. 2000

SMT-7

DominateSystem Calls

Page 18: EECC722 - Shaaban #1 Lec # 4 Fall 2011 9-14-2011 SMT Issues SMT CPU performance gain potential. Modifications to Superscalar CPU architecture necessary

EECC722 - ShaabanEECC722 - Shaaban#18 Lec # 4 Fall 2011 9-14-2011

Apache System Calls By FunctionApache System Calls By Function

“An Analysis of Operating System Behavior on a Simultaneous Multithreaded Architecture”, Josh Redstone et al. , in Proc. of the 9th Int. Conf. on Architectural Support for Programming Languages and Operating Systems, Nov. 2000

SMT-7

Page 19: EECC722 - Shaaban #1 Lec # 4 Fall 2011 9-14-2011 SMT Issues SMT CPU performance gain potential. Modifications to Superscalar CPU architecture necessary

EECC722 - ShaabanEECC722 - Shaaban#19 Lec # 4 Fall 2011 9-14-2011

Apache Dynamic Instruction MixApache Dynamic Instruction Mix

•The percentages in parenthesis for memory operations represent the proportion of loads and stores that are to physical addresses. • A percentage breakdown of branch instructions is also included.• For conditional branches, the number in parenthesis represents the percentage of conditional branches that are taken.

“An Analysis of Operating System Behavior on a Simultaneous Multithreaded Architecture”, Josh Redstone et al. , in Proc. of the 9th Int. Conf. on Architectural Support for Programming Languages and Operating Systems, Nov. 2000

SMT-7

Page 20: EECC722 - Shaaban #1 Lec # 4 Fall 2011 9-14-2011 SMT Issues SMT CPU performance gain potential. Modifications to Superscalar CPU architecture necessary

EECC722 - ShaabanEECC722 - Shaaban#20 Lec # 4 Fall 2011 9-14-2011

All applications are executing with the operating system.

Metrics for SMT SPEC, Apache & Superscalar ApacheMetrics for SMT SPEC, Apache & Superscalar Apache

“An Analysis of Operating System Behavior on a Simultaneous Multithreaded Architecture”, Josh Redstone et al. , in Proc. of the 9th Int. Conf. on Architectural Support for Programming Languages and Operating Systems, Nov. 2000

SMT-7

Page 21: EECC722 - Shaaban #1 Lec # 4 Fall 2011 9-14-2011 SMT Issues SMT CPU performance gain potential. Modifications to Superscalar CPU architecture necessary

EECC722 - ShaabanEECC722 - Shaaban#21 Lec # 4 Fall 2011 9-14-2011

Apache+OSApache+OS Total Miss rates & Distribution of Misses

• The miss categories are percentages of all user and kernel misses. • Bold entries signify kernel-induced interference.• User-kernel conflicts are misses in which the user thread conflicted with some type of kernel activity (the kernel executing on

behalf of this user thread, some other user thread, a kernel thread, or an interrupt).

“An Analysis of Operating System Behavior on a Simultaneous Multithreaded Architecture”, Josh Redstone et al. , in Proc. of the 9th Int. Conf. on Architectural Support for Programming Languages and Operating Systems, Nov. 2000

SMT-7

Page 22: EECC722 - Shaaban #1 Lec # 4 Fall 2011 9-14-2011 SMT Issues SMT CPU performance gain potential. Modifications to Superscalar CPU architecture necessary

EECC722 - ShaabanEECC722 - Shaaban#22 Lec # 4 Fall 2011 9-14-2011

Percentage of Misses Avoided Due to Percentage of Misses Avoided Due to Interthread Cooperation on ApacheInterthread Cooperation on Apache

• Percentage of misses avoided due to interthread cooperation on Apache, shown by execution mode.

• The number in a table entry shows the percentage of overall misses for the given resource that threads executing in the mode indicated on the leftmost column would have encountered, if not for prefetching by other threads executing in the mode shown at the top of the column.

“An Analysis of Operating System Behavior on a Simultaneous Multithreaded Architecture”, Josh Redstone et al. , in Proc. of the 9th Int. Conf. on Architectural Support for Programming Languages and Operating Systems, Nov. 2000

SMT-7

Page 23: EECC722 - Shaaban #1 Lec # 4 Fall 2011 9-14-2011 SMT Issues SMT CPU performance gain potential. Modifications to Superscalar CPU architecture necessary

EECC722 - ShaabanEECC722 - Shaaban#23 Lec # 4 Fall 2011 9-14-2011

OS Impact on Hardware Structures OS Impact on Hardware Structures Performance for ApachePerformance for Apache

“An Analysis of Operating System Behavior on a Simultaneous Multithreaded Architecture”, Josh Redstone et al. , in Proc. of the 9th Int. Conf. on Architectural Support for Programming Languages and Operating Systems, Nov. 2000

SMT-7

Thus must account for OS in SMT processor simulation for server applications (Apache here)

Or other types of OS intensive workloads

Page 24: EECC722 - Shaaban #1 Lec # 4 Fall 2011 9-14-2011 SMT Issues SMT CPU performance gain potential. Modifications to Superscalar CPU architecture necessary

EECC722 - ShaabanEECC722 - Shaaban#24 Lec # 4 Fall 2011 9-14-2011

OS Impact on SMT Study SummaryOS Impact on SMT Study Summary• Results show that for SMT, omission of the operating system did not

lead to a serious misprediction of performance for SPECInt95 (selected here to represent non OS intensive workloads), although the effects were more significant for a superscalar executing the same workload.

• On the Apache workload (selected here to represent OS intensive workloads) , however, the operating system is responsible for the majority of instructions executed:– Apache spends a significant amount of time responding to

system service calls in the file system and kernel networking code.

– The result of the heavy execution of OS code is an increase of pressure on various low-level resources, including the caches and the BTB.

– Kernel threads also cause more conflicts in those resources, both with other kernel threads and with user threads; on the other hand, there is an positive interthread sharing effect as well.

SMT-7

1

2

3

Thus Must account for OS in SMT processor simulations

Why?

Page 25: EECC722 - Shaaban #1 Lec # 4 Fall 2011 9-14-2011 SMT Issues SMT CPU performance gain potential. Modifications to Superscalar CPU architecture necessary

EECC722 - ShaabanEECC722 - Shaaban#25 Lec # 4 Fall 2011 9-14-2011

Possible SMT-specific OS OptimizationsPossible SMT-specific OS Optimizations• Smart SMT-optimized OS task scheduler for better SMT-core

performance:

– Schedule cooperating threads that benefit from SMT’s resource and data sharing to run simultaneously.

– To aid SMT’s latency-hiding, avoid scheduling too many threads that have conflicts over same specific CPU resource (TLB, cache FP etc.)

– For SMP-SMT system tightly-coupled threads should be scheduled to logical processors in the same physical SMT CPU (processor affinity).

• Introduce a lightweight dedicated kernel context to cached in the SMT-core to handle process management and speedup system calls.

• Prevent the “idle loop” thread from consuming execution resources:

– Intel Hyper-threading solution: use HALT instruction.

• Allow thread caching in the CPU to further reduce context-switching overheads.

i.e multiple SMT processors sharing memory

Page 26: EECC722 - Shaaban #1 Lec # 4 Fall 2011 9-14-2011 SMT Issues SMT CPU performance gain potential. Modifications to Superscalar CPU architecture necessary

EECC722 - ShaabanEECC722 - Shaaban#26 Lec # 4 Fall 2011 9-14-2011

Overview of Intel’s Hyper-Threading (HT) Microarchitecture & Performance

• Introduced in 2002 by adding 2 thread SMT (Hyper-Threading, HT) support to the Intel Xeon/P4 Northwood core (NetBurst microarchitecture).

• Major Design Goals: – Minimize increase of chip area and complexity . Implementation increased

relative chip area/power by 5%

– Prevent a stalling thread from affecting the progress of the other thread in the CPU.

– Maintain a good single-thread performance by switching to single thread mode.

• To limit increase in chip area and complexity:

– Each thread is only allocated a maximum of 50% of:• Fetch cycles, micro-ops queues, instruction scheduling queues, load/store

buffers, re-order buffer entries, instruction retirement cycles.

– No resources (TLB, cache, queues, buffers, etc.) were resized to account for the additional demands SMT poses on shared CPU resources.

• These design constraints prevented this implementation from achieving the full performance potential of a 2 thread full SMT processor.

– Performance gains of this implementation typically range from 5% to 28%

SMT-8

1

2

Vs . Potentially 15% - 60% gain for a 2 thread SMT without restrictions

1

2

Thus3

Page 27: EECC722 - Shaaban #1 Lec # 4 Fall 2011 9-14-2011 SMT Issues SMT CPU performance gain potential. Modifications to Superscalar CPU architecture necessary

EECC722 - ShaabanEECC722 - Shaaban#27 Lec # 4 Fall 2011 9-14-2011

Intel Xeon/P4 HT Processor Pipeline

• Visible to OS as two logical processors when HT is enabled• Duplicated for each thread:

– Architectural thread state– Advanced programmable Interrupt Controller (APIC)

Front-End: In-order Fetch/Decode Out-of-order Schedule/Execute In-order Commit

SMT-8

DuplicatedPer Thread

(i.e. static) (Out-of-order RISC-like core)

Page 28: EECC722 - Shaaban #1 Lec # 4 Fall 2011 9-14-2011 SMT Issues SMT CPU performance gain potential. Modifications to Superscalar CPU architecture necessary

EECC722 - ShaabanEECC722 - Shaaban#28 Lec # 4 Fall 2011 9-14-2011

Front-End Detailed Pipeline(a) Instruction Trace Cache Hit:Pre-decoded instruction micro-ops fetched from trace cacheFetch is round robin from each thread Each thread limited to 50% of micro-ops queue ready for renaming/scheduling

(b) Instruction Trace Cache Miss:Instructions fetched from L2 cache in round robin RR1.X Instruction decoding into micro-ops alternates between threads every cycle Instruction micto-ops filled in trace cache and micro-ops queueready for renaming/scheduling

SMT-8

Thread 0

Thread 1

(e.g. RR1.xx)

Replaces I-L1

Thread 0

Thread 1

Page 29: EECC722 - Shaaban #1 Lec # 4 Fall 2011 9-14-2011 SMT Issues SMT CPU performance gain potential. Modifications to Superscalar CPU architecture necessary

EECC722 - ShaabanEECC722 - Shaaban#29 Lec # 4 Fall 2011 9-14-2011

Out-Of-Order Execution Engine PipelineIn-order RenameResource Allocation

Out-of-order Schedule/Execute In-order Retirement

SMT-8

50%of entriesper thread

50%perthread(63entries)

50%perthread

Retire up to 3 micro-ops/cycle alternating between threads

Schedule/Dispatchup to 6 micro-ops/cycleNo thread constraints

TwoRegister Alias Tables (RATs)one for eachthread

No threadALU allocationConstraints

128 rename(physical registers) Memory

micro-ops

Othermicro-ops

50%of entriesper thread

(Core)

Page 30: EECC722 - Shaaban #1 Lec # 4 Fall 2011 9-14-2011 SMT Issues SMT CPU performance gain potential. Modifications to Superscalar CPU architecture necessary

EECC722 - ShaabanEECC722 - Shaaban#30 Lec # 4 Fall 2011 9-14-2011

HT Transaction Processing Performance

~ 21% HTperformance gain(for 1-2 processors)

SMT-8(Transaction processing workload)

~10% HT performance gain (for 4 processors)

(Server application)

Page 31: EECC722 - Shaaban #1 Lec # 4 Fall 2011 9-14-2011 SMT Issues SMT CPU performance gain potential. Modifications to Superscalar CPU architecture necessary

EECC722 - ShaabanEECC722 - Shaaban#31 Lec # 4 Fall 2011 9-14-2011

HT Web Server Benchmark Performance

16-21% performance gain for HT

SMT-8

Page 32: EECC722 - Shaaban #1 Lec # 4 Fall 2011 9-14-2011 SMT Issues SMT CPU performance gain potential. Modifications to Superscalar CPU architecture necessary

EECC722 - ShaabanEECC722 - Shaaban#32 Lec # 4 Fall 2011 9-14-2011

Summary of HT Performance For Compute-Intensive Workloads

SMT-9

SMP speedup range 1.65 to 2.00HT (SMT) speedup range 1.05 to 1.28

2 physical processors

1 HT processor (2 logical processors)

Why?

Page 33: EECC722 - Shaaban #1 Lec # 4 Fall 2011 9-14-2011 SMT Issues SMT CPU performance gain potential. Modifications to Superscalar CPU architecture necessary

EECC722 - ShaabanEECC722 - Shaaban#33 Lec # 4 Fall 2011 9-14-2011

Summary of HT Performance For Compute-Intensive Workloads

SMP speedup range 1.65 to 2.00SMT speedup range 1.05 to 1.28This SMT implementation cannot match or exceed SMP performance due to: 1- Thread resource/cycle constraints imposed in Intel’s hyper-threading implementation 2- No low-level hardware resources resizing for additional thread demands.

Ideal 1/3 cycle/uopCPI

Single Thread

SMT-9

Why?

Hyper-Threading Vs. SMP

One HT core Two Physical cores