Fine-Grained Fault Tolerance using Device Checkpoints Asim Kadav - - PowerPoint PPT Presentation

fine grained fault tolerance using device checkpoints
SMART_READER_LITE
LIVE PREVIEW

Fine-Grained Fault Tolerance using Device Checkpoints Asim Kadav - - PowerPoint PPT Presentation

Fine-Grained Fault Tolerance using Device Checkpoints Asim Kadav with Matthew Renzelmann and Michael M. Swift University of Wisconsin-Madison 1 The (old) elephant in the room device + drivers OS (majority of kernel code) kernel 3rd


slide-1
SLIDE 1

Fine-Grained Fault Tolerance using Device Checkpoints

Asim Kadav with Matthew Renzelmann and Michael M. Swift University of Wisconsin-Madison

1

slide-2
SLIDE 2

The (old) elephant in the room

2

device drivers

(majority of kernel code)

3rd party developers

+ OS

kernel

2

slide-3
SLIDE 3

The (old) elephant in the room

2

device drivers

(majority of kernel code)

3rd party developers

+ OS

kernel

2

slide-4
SLIDE 4

The (old) elephant in the room

2

device drivers

(majority of kernel code)

3rd party developers

+ OS

kernel

Recipe for disaster

2

slide-5
SLIDE 5

Improvement System Vali alidatio tion Improvement System

Drivers Bus Classes

Isolation Nooks [SOSP 03] 6 1 2 XFI [OSDI 06] 2 1 1 CuriOS [OSDI 08] 2 1 2 Type Safety SafeDrive [OSDI 06] 6 2 3 Singularity [Eurosys 06] 1 1 1 Specification Nexus [OSDI 08] 2 1 2 Termite [SOSP 09] 2 1 2 Recovery Shadow Drivers [OSDI 04] 13 1 3 Static analysis tools Windows SDV [Eurosys 06] All All All Coverity [CACM 10] All All All Cocinelle [Eurosys 08] All All All

3

Extensive past work on reliability research

3

slide-6
SLIDE 6

Improvement System Vali alidatio tion Improvement System

Drivers Bus Classes

Isolation Nooks [SOSP 03] 6 1 2 XFI [OSDI 06] 2 1 1 CuriOS [OSDI 08] 2 1 2 Type Safety SafeDrive [OSDI 06] 6 2 3 Singularity [Eurosys 06] 1 1 1 Specification Nexus [OSDI 08] 2 1 2 Termite [SOSP 09] 2 1 2 Recovery Shadow Drivers [OSDI 04] 13 1 3 Static analysis tools Windows SDV [Eurosys 06] All All All Coverity [CACM 10] All All All Cocinelle [Eurosys 08] All All All

3

Extensive past work on reliability research

3

slide-7
SLIDE 7

Improvement System Vali alidatio tion Improvement System

Drivers Bus Classes

Isolation Nooks [SOSP 03] 6 1 2 XFI [OSDI 06] 2 1 1 CuriOS [OSDI 08] 2 1 2 Type Safety SafeDrive [OSDI 06] 6 2 3 Singularity [Eurosys 06] 1 1 1 Specification Nexus [OSDI 08] 2 1 2 Termite [SOSP 09] 2 1 2 Recovery Shadow Drivers [OSDI 04] 13 1 3 Static analysis tools Windows SDV [Eurosys 06] All All All Coverity [CACM 10] All All All Cocinelle [Eurosys 08] All All All

3

Extensive past work on reliability research

3

slide-8
SLIDE 8

Improvement System Vali alidatio tion Improvement System

Drivers Bus Classes

Isolation Nooks [SOSP 03] 6 1 2 XFI [OSDI 06] 2 1 1 CuriOS [OSDI 08] 2 1 2 Type Safety SafeDrive [OSDI 06] 6 2 3 Singularity [Eurosys 06] 1 1 1 Specification Nexus [OSDI 08] 2 1 2 Termite [SOSP 09] 2 1 2 Recovery Shadow Drivers [OSDI 04] 13 1 3 Static analysis tools Windows SDV [Eurosys 06] All All All Coverity [CACM 10] All All All Cocinelle [Eurosys 08] All All All

3

Observation 1: Solutions that limit changes to kernel and apply to lots of drivers have real impact

Extensive past work on reliability research

3

slide-9
SLIDE 9

Improvement System Vali alidatio tion Improvement System

Drivers Bus Classes

Isolation Nooks [SOSP 03] 6 1 2 XFI [OSDI 06] 2 1 1 CuriOS [OSDI 08] 2 1 2 Type Safety SafeDrive [OSDI 06] 6 2 3 Singularity [Eurosys 06] 1 1 1 Specification Nexus [OSDI 08] 2 1 2 Termite [SOSP 09] 2 1 2 Recovery Shadow Drivers [OSDI 04] 13 1 3 Static analysis tools Windows SDV [Eurosys 06] All All All Coverity [CACM 10] All All All Cocinelle [Eurosys 08] All All All

3

Extensive past work on reliability research

Observation 2: Most systems focus on improving isolation and detection and not on recovery

3

slide-10
SLIDE 10

Driver failure recovery limited to driver restart

★ Restart driver upon failure ★ Safedrive and MINIX approach ★ Can break applications

Device Driver Device Driver-Kernel Interface

4

Applications Kernel

Shadow drivers

4

slide-11
SLIDE 11

Driver failure recovery limited to driver restart

★ Restart driver upon failure ★ Safedrive and MINIX approach ★ Can break applications

Device Driver Device Driver-Kernel Interface

4

Applications Kernel

Shadow drivers

4

slide-12
SLIDE 12

Driver failure recovery limited to driver restart

★ Restart driver upon failure ★ Safedrive and MINIX approach ★ Can break applications

Device Driver Device Shadow Driver Driver-Kernel Interface

4

Applications Kernel

★ Restart and replay upon failure ★ Shadow driver approach ★ Always record state of driver ★ Perform restart and log replay

upon failure

★ Transparent to applications

Shadow drivers

4

slide-13
SLIDE 13

Problem 1: Restart based driver recovery is slow

5

0ms 500ms 1,000ms 1,500ms 2,000ms 8139too e1000 ens1371 psmouse

Restart times net net sound input

5

slide-14
SLIDE 14

Problem 1: Restart based driver recovery is slow

5

Shadow drivers restart the driver upon failure which can be slow

0ms 500ms 1,000ms 1,500ms 2,000ms 8139too e1000 ens1371 psmouse

Restart times net net sound input

5

slide-15
SLIDE 15

Driver re-initialization probes hardware again

6

Allocate device structures Set chipset specific ops Map BAR and I/O ports Register device operations Detect chipset capabilities Cold boot device Verify EEPROM checksum Device self test Configure device Device ready

6

slide-16
SLIDE 16

Driver re-initialization probes hardware again

6

Allocate device structures Set chipset specific ops Map BAR and I/O ports Register device operations Detect chipset capabilities Cold boot device Verify EEPROM checksum Device self test Configure device Device ready

6

slide-17
SLIDE 17

Driver re-initialization probes hardware again

6

★ What does slow device re-initialization hurt? ★ Fault tolerance: Driver recovery ★ Virtualization: Live migration ★ OS functions: Fast reboot

Allocate device structures Set chipset specific ops Map BAR and I/O ports Register device operations Detect chipset capabilities Cold boot device Verify EEPROM checksum Device self test Configure device Device ready

6

slide-18
SLIDE 18

Problem 2: Shadow drivers assume drivers follow class behavior

7

★ Class definition includes: ★ Callbacks registered with the bus,

device and kernel subsystem

network driver bus net device subsystem kernel

probe xmit config network card

shadow drivers

7

slide-19
SLIDE 19

Problem 2: Shadow drivers assume drivers follow class behavior

7

How many drivers follow class behavior and how much code does this add and

★ Class definition includes: ★ Callbacks registered with the bus,

device and kernel subsystem

network driver bus net device subsystem kernel

probe xmit config network card

shadow drivers

7

slide-20
SLIDE 20

Problem 2(a): Drivers do behave outside class definitions

★ Non-class behavior that affects recovery:

  • procfs/sysfs interactions and unique ioctls

8

$ ¡echo ¡1 ¡> ¡/sys/class/sound/mixer/ device/enable Windows WLAN card config via private ioctls Linux sound card config via sysfs

8

slide-21
SLIDE 21

Problem 2(a): Drivers do behave outside class definitions

★ Non-class behavior that affects recovery:

  • procfs/sysfs interactions and unique ioctls

8

At least 16% of drivers have non-class behavior and may not recover correctly using shadow drivers

$ ¡echo ¡1 ¡> ¡/sys/class/sound/mixer/ device/enable Windows WLAN card config via private ioctls Linux sound card config via sysfs

8

slide-22
SLIDE 22

Problem 2(b): Too many classes

9

★ “Understanding Modern Device Drivers” ASPLOS 2012

ata (1%) cdrom ide md (RAID) mmc network RAID mtd (1.5%) scsi (9.6%) floppy tape acpi blue tooth crypto fire wire gpu (3.9%) input joy stick key board mouse touch screen tablet game port serio leds media (10.5%) isdn (3.4%) sound (10%) pcm midi mixer thermal tty char (52%) block (16%) net (27%)

  • ther (5%)

atm ethernet infiniband wireless wimax token ring Linux Device Drivers gpio tpm serial display lcd back light video (5.2%) pata disk sata disk fiber channel iscsi usb-storage

  • sd

raid drm vga bus drivers xen/lguest dma/pci libs video radio digital video broadcasting wan uwb driver libraries

9

slide-23
SLIDE 23

Problem 2(b): Too many classes

9

★ “Understanding Modern Device Drivers” ASPLOS 2012

ata (1%) cdrom ide md (RAID) mmc network RAID mtd (1.5%) scsi (9.6%) floppy tape acpi blue tooth crypto fire wire gpu (3.9%) input joy stick key board mouse touch screen tablet game port serio leds media (10.5%) isdn (3.4%) sound (10%) pcm midi mixer thermal tty char (52%) block (16%) net (27%)

  • ther (5%)

atm ethernet infiniband wireless wimax token ring Linux Device Drivers gpio tpm serial display lcd back light video (5.2%) pata disk sata disk fiber channel iscsi usb-storage

  • sd

raid drm vga bus drivers xen/lguest dma/pci libs video radio digital video broadcasting wan uwb driver libraries

Class-specific driver recovery leads to a large kernel recovery subsystem

9

slide-24
SLIDE 24

Fine-Grained Fault Tolerance (FGFT)

10

10

slide-25
SLIDE 25

Fine-Grained Fault Tolerance (FGFT)

10

Fine-grained Isolation

★ Runs driver entry points

like transactions

★ Relies on code generation

to limit new code in kernel

10

slide-26
SLIDE 26

Fine-Grained Fault Tolerance (FGFT)

10

Fine-grained Isolation

★ Runs driver entry points

like transactions

★ Relies on code generation

to limit new code in kernel

Checkpoint-based recovery

★ Provides fast and correct

recovery semantics

10

slide-27
SLIDE 27

Fine-Grained Fault Tolerance (FGFT)

10

Fine-grained Isolation

★ Runs driver entry points

like transactions

★ Relies on code generation

to limit new code in kernel

★ Requires incremental overhead/changes to drivers ★ Shifts burden of fault tolerance to faulty code

Checkpoint-based recovery

★ Provides fast and correct

recovery semantics

10

slide-28
SLIDE 28

Outline

11

Introduction Evaluation and Conclusions Fine-grained isolation Checkpoint-based recovery

11

slide-29
SLIDE 29

Unit of fault tolerance: Driver entry point

12

network driver

network card probe xmit config

12

slide-30
SLIDE 30

Unit of fault tolerance: Driver entry point

12

network driver

network card probe xmit config

whole driver isolation

12

slide-31
SLIDE 31

Unit of fault tolerance: Driver entry point

12

network driver

network card probe xmit config

12

slide-32
SLIDE 32

Unit of fault tolerance: Driver entry point

12

network driver

network card probe xmit config

FGFT isolation

12

slide-33
SLIDE 33

Unit of fault tolerance: Driver entry point

12

★ Provide fault tolerance to specific driver entry points

network driver

network card probe xmit config

FGFT isolation

12

slide-34
SLIDE 34

Unit of fault tolerance: Driver entry point

12

★ Provide fault tolerance to specific driver entry points

network driver

network card probe xmit config

★ Can be applied to untested code or code marked

suspicious by static or runtime tools

FGFT isolation

12

slide-35
SLIDE 35

netdev

Transactional support through code generation

13

network driver

get ringparam

netdev

13

slide-36
SLIDE 36

netdev

Transactional support through code generation

13

network driver

get ringparam

netdev

SFI network driver

s t u b s s t u b s

13

slide-37
SLIDE 37

netdev

Transactional support through code generation

13

network driver

get ringparam

SFI network driver

s t u b s s t u b s netdev

13

slide-38
SLIDE 38

netdev

Transactional support through code generation

13

Range Table

Address Access rights 0xffffa000 Read 0xffffa008 Write 0xffffa00a Read

network driver

get ringparam

SFI network driver

s t u b s s t u b s netdev

13

slide-39
SLIDE 39

netdev

Transactional support through code generation

13

Range Table

Address Access rights 0xffffa000 Read 0xffffa008 Write 0xffffa00a Read

★ Detects and recovers from: ★ Memory errors like invalid pointer accesses ★ Structural errors like malformed structures ★ Processor exceptions like divide by zero, stack corruption

network driver

get ringparam

SFI network driver

s t u b s s t u b s netdev

13

slide-40
SLIDE 40

result netdev

Transactional support through code generation

13

Range Table

Address Access rights 0xffffa000 Read 0xffffa008 Write 0xffffa00a Read

★ Detects and recovers from: ★ Memory errors like invalid pointer accesses ★ Structural errors like malformed structures ★ Processor exceptions like divide by zero, stack corruption

network driver

get ringparam

SFI network driver

s t u b s s t u b s netdev netdev

13

slide-41
SLIDE 41

Outline

14

Introduction Conclusion Fine-grained isolation Checkpoint-based recovery

14

slide-42
SLIDE 42

Checkpointing drivers is hard

★Easy to capture memory state

15

network driver

network card

15

slide-43
SLIDE 43

Checkpointing drivers is hard

★Easy to capture memory state

15

network driver

network card

checkpoint

15

slide-44
SLIDE 44

Checkpointing drivers is hard

★Easy to capture memory state

15

network driver

network card

checkpoint

★ Device state is not captured ★ Device configuration space

15

slide-45
SLIDE 45

Checkpointing drivers is hard

★Easy to capture memory state

15

network driver

network card

checkpoint

★ Device state is not captured ★ Device configuration space ★ Internal device registers and counters

15

slide-46
SLIDE 46

Checkpointing drivers is hard

★Easy to capture memory state

15

network driver

network card

checkpoint

★ Device state is not captured ★ Device configuration space ★ Internal device registers and counters ★ Memory buffer addresses used for DMA

15

slide-47
SLIDE 47

Checkpointing drivers is hard

★Easy to capture memory state

15

network driver

network card

checkpoint

★ Device state is not captured ★ Device configuration space ★ Internal device registers and counters ★ Memory buffer addresses used for DMA ★ Unique for every device

15

slide-48
SLIDE 48

Checkpointing drivers is hard

★Easy to capture memory state

15

network driver

network card

checkpoint

★ Device state is not captured ★ Device configuration space ★ Internal device registers and counters ★ Memory buffer addresses used for DMA ★ Unique for every device

Intuition: Operating systems already capture device state during power management

15

slide-49
SLIDE 49

Intuition with power management

16

★ Refactor power management code for device checkpoints ★ Correct: Developer captures unique device semantics ★ Fast: Avoids probe and latency critical for applications ★ Ask developers to export checkpoint/restore in their drivers

16

slide-50
SLIDE 50

Device checkpoint/restore from PM code

17

Save config state Save register state Disable device Save DMA state Suspend device Restore config state Restore register state Restore or reset DMA state Re-attach/Enable device Device Ready

Suspend Resume

17

slide-51
SLIDE 51

Device checkpoint/restore from PM code

17

Save config state Save register state Save DMA state Suspend device Restore config state Restore register state Restore or reset DMA state Re-attach/Enable device Device Ready

Suspend Resume

17

slide-52
SLIDE 52

Device checkpoint/restore from PM code

17

Save config state Save register state Save DMA state Restore config state Restore register state Restore or reset DMA state Re-attach/Enable device Device Ready

Suspend Resume

17

slide-53
SLIDE 53

Device checkpoint/restore from PM code

17

Save config state Save register state Save DMA state Restore config state Restore register state Restore or reset DMA state Re-attach/Enable device Device Ready

Suspend Resume

17

slide-54
SLIDE 54

Device checkpoint/restore from PM code

17

Save config state Save register state Save DMA state Restore config state Restore register state Restore or reset DMA state Re-attach/Enable device Device Ready

Resume Checkpoint

17

slide-55
SLIDE 55

Device checkpoint/restore from PM code

17

Save config state Save register state Save DMA state Restore config state Restore register state Restore or reset DMA state Re-attach/Enable device

Resume Checkpoint

17

slide-56
SLIDE 56

Device checkpoint/restore from PM code

17

Save config state Save register state Save DMA state Restore config state Restore register state Restore or reset DMA state

Resume Checkpoint

17

slide-57
SLIDE 57

Device checkpoint/restore from PM code

17

Save config state Save register state Save DMA state Restore config state Restore register state Restore or reset DMA state

Restore Checkpoint

17

slide-58
SLIDE 58

Device checkpoint/restore from PM code

17

Save config state Save register state Save DMA state Restore config state Restore register state Restore or reset DMA state

Suspend/resume code provides device checkpoint functionality

Restore Checkpoint

17

slide-59
SLIDE 59

Synergy of isolation and fast checkpoints

18

netdev

network driver

netdev

18

slide-60
SLIDE 60

Synergy of isolation and fast checkpoints

18

xmit netdev

network driver

netdev

18

slide-61
SLIDE 61

Synergy of isolation and fast checkpoints

18

netdev

network driver

netdev

get ringparam

18

slide-62
SLIDE 62

Synergy of isolation and fast checkpoints

18

netdev

network driver

netdev

C

get ringparam

18

slide-63
SLIDE 63

Synergy of isolation and fast checkpoints

18

netdev

network driver

netdev

SFI network driver

s t u b s s t u b s

C

get ringparam

18

slide-64
SLIDE 64

Synergy of isolation and fast checkpoints

18

netdev

network driver

netdev

SFI network driver

s t u b s s t u b s

C

get ringparam

18

slide-65
SLIDE 65

Synergy of isolation and fast checkpoints

18

netdev netdev netdev

network driver SFI network driver

s t u b s s t u b s

C

get ringparam

18

slide-66
SLIDE 66

Synergy of isolation and fast checkpoints

18

netdev netdev netdev

network driver SFI network driver

s t u b s s t u b s

C

get ringparam

18

slide-67
SLIDE 67

Synergy of isolation and fast checkpoints

18

netdev netdev netdev Range Table

Address Access rights 0xffffa000 Read 0xffffa008 Write 0xffffa00a Read

network driver SFI network driver

s t u b s s t u b s

C

get ringparam

18

slide-68
SLIDE 68

Synergy of isolation and fast checkpoints

18

netdev netdev netdev Range Table

Address Access rights 0xffffa000 Read 0xffffa008 Write 0xffffa00a Read

network driver SFI network driver

s t u b s s t u b s

C

get ringparam

18

slide-69
SLIDE 69

Synergy of isolation and fast checkpoints

18

netdev netdev netdev Range Table

Address Access rights 0xffffa000 Read 0xffffa008 Write 0xffffa00a Read

network driver SFI network driver

s t u b s s t u b s

C

get ringparam

18

slide-70
SLIDE 70

Synergy of isolation and fast checkpoints

18

err

R

netdev netdev netdev Range Table

Address Access rights 0xffffa000 Read 0xffffa008 Write 0xffffa00a Read

network driver SFI network driver

s t u b s s t u b s

C

get ringparam

18

slide-71
SLIDE 71

Synergy of isolation and fast checkpoints

18

err

R

FGFT provides transactional execution of driver entry points

netdev netdev netdev Range Table

Address Access rights 0xffffa000 Read 0xffffa008 Write 0xffffa00a Read

network driver SFI network driver

s t u b s s t u b s

C

get ringparam

18

slide-72
SLIDE 72

How does this give us transactional execution?

19

19

slide-73
SLIDE 73

How does this give us transactional execution?

19

★ Atomicity: All or nothing execution ★ Driver state: Run code in SFI module ★ Device state: Explicitly checkpoint/restore state

19

slide-74
SLIDE 74

How does this give us transactional execution?

19

★ Atomicity: All or nothing execution ★ Driver state: Run code in SFI module ★ Device state: Explicitly checkpoint/restore state ★ Isolation: Serialization to hide incomplete transactions ★ Re-use existing device locks to lock driver ★ Two phase locking

19

slide-75
SLIDE 75

How does this give us transactional execution?

19

★ Atomicity: All or nothing execution ★ Driver state: Run code in SFI module ★ Device state: Explicitly checkpoint/restore state ★ Isolation: Serialization to hide incomplete transactions ★ Re-use existing device locks to lock driver ★ Two phase locking ★ Consistency: Only valid (kernel, driver and device) states ★ Higher level mechanisms to rollback external actions ★ At most once device action guarantee to applications

19

slide-76
SLIDE 76

Outline

20

Introduction Evaluation & Conclusions Fine-grained isolation Checkpoint-based recovery

20

slide-77
SLIDE 77

Evaluation platform

21

★ Criterion : ★ Latency of recovery: How fast is it? ★ Correctness of recovery: How well does it work? ★ Incremental effort: How much work is it? ★ Performance: How much does it cost?

21

slide-78
SLIDE 78

Evaluation platform

21

★ Platform : ★ Implemented in Linux 2.6.29 ★ 2.5 GHz Intel Core 2 Quad

core w/ 4 GB DDR2 DRAM

★ Six drivers across three classes ★ Criterion : ★ Latency of recovery: How fast is it? ★ Correctness of recovery: How well does it work? ★ Incremental effort: How much work is it? ★ Performance: How much does it cost?

Driver Class Bus

8139too net PCI e1000 net PCI r8169 net PCI pegasus net USB psmouse sound PCI ens1371 input serio

21

slide-79
SLIDE 79

Recovery speedup

22

8139too e1000 pegasus r8169 ens1371 psmouse 0ms 500ms 1,000ms 1,500ms 2,000ms

Restart recovery FGFT recovery

Recovery times

22

slide-80
SLIDE 80

Recovery speedup

22

8139too e1000 pegasus r8169 ens1371 psmouse 0ms 500ms 1,000ms 1,500ms 2,000ms

680.00 1030.00 120.00 150.00 1800.00 310.00

Restart recovery FGFT recovery

Recovery times

22

slide-81
SLIDE 81

Recovery speedup

22

8139too e1000 pegasus r8169 ens1371 psmouse 0ms 500ms 1,000ms 1,500ms 2,000ms

680.00 1030.00 120.00 150.00 1800.00 310.00

410.00 115.00 0.04 5.00 295.00 0.07

Restart recovery FGFT recovery

Recovery times

22

slide-82
SLIDE 82

Recovery speedup

22

FGFT provides significant speedup in driver recovery and improves system availability

8139too e1000 pegasus r8169 ens1371 psmouse 0ms 500ms 1,000ms 1,500ms 2,000ms

680.00 1030.00 120.00 150.00 1800.00 310.00

410.00 115.00 0.04 5.00 295.00 0.07

Restart recovery FGFT recovery

Recovery times

22

slide-83
SLIDE 83

Static and dynamic fault injection

Driver Injected Faults Native Crashes

8139too 43 43 e1000 47 47 r8169 36 36 pegasus 34 33 ens1371 22 21 psmouse 46 46 TOTAL 258 256

23

23

slide-84
SLIDE 84

Static and dynamic fault injection

Driver Injected Faults Native Crashes FGFT Crashes

8139too 43 43 NONE e1000 47 47 NONE r8169 36 36 NONE pegasus 34 33 NONE ens1371 22 21 NONE psmouse 46 46 NONE TOTAL 258 256 NONE

23

23

slide-85
SLIDE 85

Static and dynamic fault injection

Driver Injected Faults Native Crashes FGFT Crashes

8139too 43 43 NONE e1000 47 47 NONE r8169 36 36 NONE pegasus 34 33 NONE ens1371 22 21 NONE psmouse 46 46 NONE TOTAL 258 256 NONE

23

FGFT recovers from multiple failures : 1) restores non-class state and 2) does not affect other threads

23

slide-86
SLIDE 86

Programming effort

Driver LOC Isolation ann annotations Recovery ad y additions Driver annotations Kernel annotations LOC Moved LOC Added

8139too 1, 904 15 20 26 4 e1000 13, 973 32 32 10 r8169 2, 993 10 17 5 pegasus 1, 541 26 12 22 5 ens1371 2, 110 23 66 16 6 psmouse 2, 448 11 19 19 6

24

24

slide-87
SLIDE 87

Programming effort

Driver LOC Isolation ann annotations Recovery ad y additions Driver annotations Kernel annotations LOC Moved LOC Added

8139too 1, 904 15 20 26 4 e1000 13, 973 32 32 10 r8169 2, 993 10 17 5 pegasus 1, 541 26 12 22 5 ens1371 2, 110 23 66 16 6 psmouse 2, 448 11 19 19 6

24

FGFT requires a loadable kernel module (1200 LOC) and 38 lines of kernel changes to trap processor exceptions

24

slide-88
SLIDE 88

Throughput with isolation and recovery

Native FGFT-­‑I/O-­‑all FGFT-­‑off-­‑I/O FGFT-­‑I/O-­‑1/2

netperf on Intel quad-core machines

25

25

slide-89
SLIDE 89

Throughput with isolation and recovery

25 50 75 100

Throughput %age (Baseline 844 Mbps) e1000 Network Card Native FGFT-­‑I/O-­‑all FGFT-­‑off-­‑I/O FGFT-­‑I/O-­‑1/2

netperf on Intel quad-core machines

25

25

slide-90
SLIDE 90

Throughput with isolation and recovery

25 50 75 100

100

Throughput %age (Baseline 844 Mbps) e1000 Network Card Native FGFT-­‑I/O-­‑all FGFT-­‑off-­‑I/O FGFT-­‑I/O-­‑1/2

netperf on Intel quad-core machines

25

CPU: 2.4%

25

slide-91
SLIDE 91

Throughput with isolation and recovery

25 50 75 100

100 93

Throughput %age (Baseline 844 Mbps) e1000 Network Card Native FGFT-­‑I/O-­‑all FGFT-­‑off-­‑I/O FGFT-­‑I/O-­‑1/2

netperf on Intel quad-core machines

25

CPU: 2.4% 2.4%

25

slide-92
SLIDE 92

Throughput with isolation and recovery

25 50 75 100

100 93 100

Throughput %age (Baseline 844 Mbps) e1000 Network Card Native FGFT-­‑I/O-­‑all FGFT-­‑off-­‑I/O FGFT-­‑I/O-­‑1/2

netperf on Intel quad-core machines

25

CPU: 2.4% 2.4% 3.4%

25

slide-93
SLIDE 93

Throughput with isolation and recovery

25 50 75 100

100 93 100 96

Throughput %age (Baseline 844 Mbps) e1000 Network Card Native FGFT-­‑I/O-­‑all FGFT-­‑off-­‑I/O FGFT-­‑I/O-­‑1/2

netperf on Intel quad-core machines

25

CPU: 2.4% 2.4% 2.9% 3.4%

25

slide-94
SLIDE 94

Throughput with isolation and recovery

25 50 75 100

100 93 100 96

Throughput %age (Baseline 844 Mbps) e1000 Network Card Native FGFT-­‑I/O-­‑all FGFT-­‑off-­‑I/O FGFT-­‑I/O-­‑1/2

netperf on Intel quad-core machines

25

CPU: 2.4% 2.4% 2.9% 3.4%

FGFT can isolate and recover high bandwidth devices at low overhead without adding kernel subsystems

25

slide-95
SLIDE 95

Summary

26

26

slide-96
SLIDE 96

Summary

26

★ FGFT runs driver code as transactions ★ Provides fault tolerance at incremental

performance and programmer efforts

★ Introduced device checkpoints ★ Provides fast and complete recovery semantics ★ Fast device checkpoints should be explored in other

domains like fast reboot, upgrade etc.

26

slide-97
SLIDE 97

Questions

Asim Kadav

★ http://cs.wisc.edu/~kadav ★ kadav@cs.wisc.edu ★ Graduating in spring!

27

slide-98
SLIDE 98

Extra slides

★ Unlike suspend, devices continue to be accessed after a

checkpoint

★ Rely on drivers following ACPI specifications for

correctness

28

slide-99
SLIDE 99

Latency for device checkpoint/restore

Driver Class Bus Checkpoint Times Restore Times

8139too net PCI 33μs 62μs e1000 net PCI 32μs 280ms r8169 net PCI 26μs 30μs pegasus net USB 0μs 4ms ens1371 sound PCI 33μs 111ms psmouse input serio 0μs 390ms

29

Fast checkpoint/restore using suspend/resume

29

slide-100
SLIDE 100

Transforming drivers to run as FGFT

If ¡(c==0) ¡{ . print ¡(“Driver ¡ init”); } . .

Driver with annotations

Static modifications

30

30

slide-101
SLIDE 101

Transforming drivers to run as FGFT

If ¡(c==0) ¡{ . print ¡(“Driver ¡ init”); } . .

Driver with annotations

Static modifications

30

User supplied annotations

Source transformation (adds driver transactions)

30

slide-102
SLIDE 102

Transforming drivers to run as FGFT

If ¡(c==0) ¡{ . print ¡(“Driver ¡ init”); } . .

Driver with annotations

Static modifications

30

If ¡(c==0) ¡{ . print ¡(“Driver ¡ init”); } . . If ¡(c==0) ¡{ . print ¡(“Driver ¡ init”); } . .

User supplied annotations

Source transformation (adds driver transactions)

Main driver module SFI driver module

SFI = software fault isolated

30

slide-103
SLIDE 103

Transforming drivers to run as FGFT

If ¡(c==0) ¡{ . print ¡(“Driver ¡ init”); } . .

Driver with annotations

Static modifications Run-time support

30

If ¡(c==0) ¡{ . print ¡(“Driver ¡ init”); } . . If ¡(c==0) ¡{ . print ¡(“Driver ¡ init”); } . .

User supplied annotations

Source transformation (adds driver transactions)

Main driver module SFI driver module

SFI = software fault isolated

30

slide-104
SLIDE 104

Transforming drivers to run as FGFT

If ¡(c==0) ¡{ . print ¡(“Driver ¡ init”); } . .

Driver with annotations

Communication and recovery support

Static modifications Run-time support

30

If ¡(c==0) ¡{ . print ¡(“Driver ¡ init”); } . . If ¡(c==0) ¡{ . print ¡(“Driver ¡ init”); } . .

1200 LOC

User supplied annotations

Source transformation (adds driver transactions)

Object tracking Marshaling/ Demarshaling Kernel undo log Main driver module SFI driver module

SFI = software fault isolated

30