+ All Categories
Home > Documents > Z13: Simultaneous Multithreading and System Level Testing Ali Duale Dennis Wittig Shailesh Gami.

Z13: Simultaneous Multithreading and System Level Testing Ali Duale Dennis Wittig Shailesh Gami.

Date post: 03-Jan-2016
Category:
Upload: piers-strickland
View: 223 times
Download: 0 times
Share this document with a friend
Popular Tags:
16
z13: Simultaneous Multithreading and System Level Testing Ali Duale Dennis Wittig Shailesh Gami
Transcript
Page 1: Z13: Simultaneous Multithreading and System Level Testing Ali Duale Dennis Wittig Shailesh Gami.

z13: Simultaneous Multithreading and System Level Testing

Ali DualeDennis WittigShailesh Gami

Page 2: Z13: Simultaneous Multithreading and System Level Testing Ali Duale Dennis Wittig Shailesh Gami.

Systems Assurance Kernel (SAK)• Main system level test for z Systems Architecture Implementations• Enterprise/Business Class Hardware• Software emulators

• Test Oriented Operating System and system level test exercisers • In use for decades • Architecture Compliance• Backward compatible• Tolerant for unstable implementations/early development • Capability of error/test case reproducibility • Operator controllable

Page 3: Z13: Simultaneous Multithreading and System Level Testing Ali Duale Dennis Wittig Shailesh Gami.

Systems Assurance Kernel (SAK) - continued• Test exercisers:

• CPU • Memory hierarchy • IO • Crypto• Any combinations of the above• Pseudo-random test generation

• Capable of running n copies of same/different test exercisers • Resource availability - limit

• Pseudo-Random Test case build and result prediction are done with full speed of the machine under test• Millions of test cases per minute • Endless combinations of test

Page 4: Z13: Simultaneous Multithreading and System Level Testing Ali Duale Dennis Wittig Shailesh Gami.

Exerciser Focuses

• Single-processor (UNI) • Multiple-Processor (MP)• General and Control Instructions• Branching• Floating-Point (HFP, BFP and DFP)• SIMD• Cache coherency, Serializations, Memory access ordering• IO Subsystem and Devices• Crypto Devices• etc

Page 5: Z13: Simultaneous Multithreading and System Level Testing Ali Duale Dennis Wittig Shailesh Gami.

General Test Flow

1. Build Instruction Stream2. Predict result to interruption point 3. Execute Instruction Stream4. Post process result as required5. Compare result 6. Report any errors7. Repeat the process until stopped

Page 6: Z13: Simultaneous Multithreading and System Level Testing Ali Duale Dennis Wittig Shailesh Gami.

6

Build pseudo-random instruction stream

Execute the test case

Interrupt predicted?

no

yes

Predict test case result

Valid compare

Point?

noCompare

Mismatch?

yes

noReport error

yes

Page 7: Z13: Simultaneous Multithreading and System Level Testing Ali Duale Dennis Wittig Shailesh Gami.

Simultaneous Multi Threading - SMT• With SMT each core supports more than one instruction stream

• Each thread maintains a unique and complete CPU context• All threads share/compete for core execution resources

• Each thread executes its own instruction stream • Streams do not have to be based on same architectures• Streams are totally independent of one another

• Each appears as if it runs on a complete CPU in non SMT systems

• Test challenge: • Build basic infrastructure for SMT• Build instruction streams for each thread • SMT with random number of threads enabled• SMT with streams of same/different architectures running on threads • Capability of multiple instruction stream rebuild with a single seed• Direct and indirect testing

Page 8: Z13: Simultaneous Multithreading and System Level Testing Ali Duale Dennis Wittig Shailesh Gami.

SMT: Direct Testing

Hardware

Firmware

TE1, CP1

SAK/OS

TE2,CP1 TE1,CP2 TE2, CPn…….

TEi= Test Exerciser i

CPj = Copy j

Page 9: Z13: Simultaneous Multithreading and System Level Testing Ali Duale Dennis Wittig Shailesh Gami.

SMT: Indirect Testing

Hardware

Firmware

TE1, CP1

SAK/OS

TE2,CP1 TE1,CP2 TE2, CPn…….

PR/SM

TEi= Test Exerciser i

CPj = Copy j

Page 10: Z13: Simultaneous Multithreading and System Level Testing Ali Duale Dennis Wittig Shailesh Gami.

SMT Test Case Build: Overview

• Enable Test Exercisers to test SMT• Keep backward compatibility • Exerciser must remain capable of testing prior z Systems implementations

• Stress new architecture features• New test case build methodology

• Alternate SMT being on and off • Randomly decided/operator controlled

• Transparency in result prediction• Result prediction processor: oblivious to thread number etc

Page 11: Z13: Simultaneous Multithreading and System Level Testing Ali Duale Dennis Wittig Shailesh Gami.

SMT: Test Case Generation

• Obtain needed memory buffers for all threads • Randomize test environment for each thread• Addressing mode• Exceptions• Address translation means• Functions enablement/disablement • Architecture mode

• Allow building different architectures for different threads• etc

• Accommodate common control fields (as required by architecture)

Page 12: Z13: Simultaneous Multithreading and System Level Testing Ali Duale Dennis Wittig Shailesh Gami.

SMT Test Sequence

• Build Test case for each enabled thread• Predict results for each enabled thread (up to a compare point)• Execute the test cases in parallel (SMT in action here)• Drive all thread execution to the next compare point

• all threads may not reach the end of their test case at the same time• Maintain execution history for error analysis

• Compare results• Output human readable error and trace reports

Page 13: Z13: Simultaneous Multithreading and System Level Testing Ali Duale Dennis Wittig Shailesh Gami.

All threads are at

compare point

Send Test Case to Execution

Wait for test case ending/interruptions

Re-drive threads which have not reached compare points

compare Done test case

yes

no

Page 14: Z13: Simultaneous Multithreading and System Level Testing Ali Duale Dennis Wittig Shailesh Gami.

SMT Test Case Execution Flow• Execute the test case until all threads exit test cases• Gather context of each thread • Check for “early exit” of test case due to:• Interruptible instruction in any thread• Forced to exit: One of the threads completed before others• Transaction Execution abort in any thread and may need retry

• “Early exit” cases require test case re-drive in one to n threads until all reach the next SMT compare point • A completed thread is not re-dispatched into execution while other

threads are re-driven into test case execution

Page 15: Z13: Simultaneous Multithreading and System Level Testing Ali Duale Dennis Wittig Shailesh Gami.

Execution and Test Case Re-drive Flow Example

Thread 0 (TID0) Thread 1 (TID1)

Both at compare points

TID0 forced outTID1 comes out firstTID0 alone

TID1 alone

TID0 intrp pt1

TID0 intrp pt2

TID1 intrp pt1

TID1 intrp pt2

TID0 TC re-drivenTID1 forced out

TID1 TC re-drivenTID0 comes out first

Both at compare points

Page 16: Z13: Simultaneous Multithreading and System Level Testing Ali Duale Dennis Wittig Shailesh Gami.

THANK YOU

Q/A


Recommended