Hardware Supported Permission Checks On Persistent Objects for - - PowerPoint PPT Presentation

hardware supported permission checks on persistent
SMART_READER_LITE
LIVE PREVIEW

Hardware Supported Permission Checks On Persistent Objects for - - PowerPoint PPT Presentation

Hardware Supported Permission Checks On Persistent Objects for Performance and Programmability Tiancong Wang, Sakthikumaran Sambasivam, James Tuck twang14@ncsu.edu or jtuck@ncsu.edu 1 NVM Programming 2 NVM Programming


slide-1
SLIDE 1

Hardware Supported Permission Checks On Persistent Objects for Performance and Programmability

Tiancong Wang, Sakthikumaran Sambasivam, James Tuck twang14@ncsu.edu or jtuck@ncsu.edu

1

slide-2
SLIDE 2

NVM Programming

2

slide-3
SLIDE 3

NVM Programming

  • Non-Volatile Memory is attractive
  • Byte addressable persistent storage

NVMM

2

slide-4
SLIDE 4

NVM Programming

  • Non-Volatile Memory is attractive
  • Byte addressable persistent storage
  • Direct access (DAX)

NVMM

2

slide-5
SLIDE 5

NVM Programming

  • Non-Volatile Memory is attractive
  • Byte addressable persistent storage
  • Direct access (DAX)
  • Treat NVM as many persistent

regions, a.k.a. pools

NVMM Pool 1 Pool 2

2

slide-6
SLIDE 6

NVM Programming

  • Non-Volatile Memory is attractive
  • Byte addressable persistent storage
  • Direct access (DAX)
  • Treat NVM as many persistent

regions, a.k.a. pools

  • Pools are mapped to address space

to create persistent data structure

Address Space

text data BSS heap stack

NVMM Pool 1 Pool 2

2

slide-7
SLIDE 7

NVM Programming

  • Non-Volatile Memory is attractive
  • Byte addressable persistent storage
  • Direct access (DAX)
  • Treat NVM as many persistent

regions, a.k.a. pools

  • Pools are mapped to address space

to create persistent data structure

  • Use permanent pointers for creating

linked data structures

Address Space

text data BSS heap stack

NVMM Pool 1 Pool 2

2

slide-8
SLIDE 8

NVM Programming

  • Non-Volatile Memory is attractive
  • Byte addressable persistent storage
  • Direct access (DAX)
  • Treat NVM as many persistent

regions, a.k.a. pools

  • Pools are mapped to address space

to create persistent data structure

  • Use permanent pointers for creating

linked data structures

  • A permanent pointer can point to an
  • bject within the pool, or across

pools

Address Space

text data BSS heap stack

NVMM Pool 1 Pool 2

2

slide-9
SLIDE 9

Problem

Address Space

text data BSS heap stack

Program 1 NVMM Pool 1 Pool 2

3

slide-10
SLIDE 10

Problem

Address Space

text data BSS heap stack

Program 1

  • Another program wants to access

the same data structure NVMM Pool 1 Pool 2

3

Address Space

text data BSS heap stack

Program 2

slide-11
SLIDE 11

Problem

Address Space

text data BSS heap stack

Program 1

  • Another program wants to access

the same data structure ★Is the permanent pointer still valid? NVMM Pool 1 Pool 2

3

Address Space

text data BSS heap stack

? Program 2

slide-12
SLIDE 12

Problem

Address Space

text data BSS heap stack

Program 1

  • Another program wants to access

the same data structure ★Is the permanent pointer still valid?

  • Need to map the pools before

accessing it. NVMM Pool 1 Pool 2

3

Address Space

text data BSS heap stack

? Program 2

slide-13
SLIDE 13

Problem

Address Space

text data BSS heap stack

Program 1

  • Another program wants to access

the same data structure ★Is the permanent pointer still valid?

  • Need to map the pools before

accessing it.

  • Not all the programs have same

permissions; need to check the permission before mapping NVMM Pool 1 Pool 2

3

Address Space

text data BSS heap stack

? Program 2

slide-14
SLIDE 14

Problem

Address Space

text data BSS heap stack

Program 1

  • Another program wants to access

the same data structure ★Is the permanent pointer still valid?

  • Need to map the pools before

accessing it.

  • Not all the programs have same

permissions; need to check the permission before mapping ★We need to validate on ALL permanent pointers before dereferencing, to make sure the pool is checked and mapped NVMM Pool 1 Pool 2

3

Address Space

text data BSS heap stack

? Program 2

slide-15
SLIDE 15

Problem

Address Space

text data BSS heap stack

Program 1

  • Another program wants to access

the same data structure ★Is the permanent pointer still valid?

  • Need to map the pools before

accessing it.

  • Not all the programs have same

permissions; need to check the permission before mapping ★We need to validate on ALL permanent pointers before dereferencing, to make sure the pool is checked and mapped NVMM Pool 1 Pool 2

3

Address Space

text data BSS heap stack

? Program 2 Performance overhead Programming burden

slide-16
SLIDE 16

Solution

  • System Persistent Object Table

(SPOT)

  • Similar to page table, BUT is a

system table.

  • Permission check: stores

permission information

  • Mapping: stores mapping of

physical addresses

  • Programmers no longer need to

reason about permanent pointers as long as the program has permissions Pool ID Physical addr. Permission info

System Persistent Object Table (SPOT)

slide-17
SLIDE 17

Contributions

5

slide-18
SLIDE 18

Contributions

  • Point out permanent pointers can point to unmapped regions;

reasoning about them is a new programming burden

5

slide-19
SLIDE 19

Contributions

  • Point out permanent pointers can point to unmapped regions;

reasoning about them is a new programming burden

  • Hardware can efficiently check permission and map pools when

dereferencing any permanent address.

5

slide-20
SLIDE 20

Contributions

  • Point out permanent pointers can point to unmapped regions;

reasoning about them is a new programming burden

  • Hardware can efficiently check permission and map pools when

dereferencing any permanent address.

  • We study and compare different design choices that provide

permission checks in hardware and software

5

slide-21
SLIDE 21

Contributions

  • Point out permanent pointers can point to unmapped regions;

reasoning about them is a new programming burden

  • Hardware can efficiently check permission and map pools when

dereferencing any permanent address.

  • We study and compare different design choices that provide

permission checks in hardware and software

  • Evaluate on 6 microbenchmarks and 2 applications

5

slide-22
SLIDE 22

Contributions

  • Point out permanent pointers can point to unmapped regions;

reasoning about them is a new programming burden

  • Hardware can efficiently check permission and map pools when

dereferencing any permanent address.

  • We study and compare different design choices that provide

permission checks in hardware and software

  • Evaluate on 6 microbenchmarks and 2 applications
  • Our design offers a 2.9x speedup on average for micro-

benchmarks and 1.4x and 1.8x speedup on TPC-C and Vacation

5

slide-23
SLIDE 23

Outline

  • Introduction
  • Motivation - More details of permission check and pool

mapping

  • Implementation - Hardware supported permission check

(SPOT)

  • Result - Performance on out-of-order processors
  • Summary

6

slide-24
SLIDE 24

MOTIVATION

  • Permanent address: ObjectID
  • Where’s programming burden and performance overhead
  • Idea of automatic permission check

7

slide-25
SLIDE 25

Motivation - ObjectIDs

slide-26
SLIDE 26

Motivation - ObjectIDs

  • Permanent address:

ObjectID, (Pool ID, offset)

slide-27
SLIDE 27

Motivation - ObjectIDs

  • Permanent address:

ObjectID, (Pool ID, offset)

  • Translation: Address =

BaseAddressLookup(Pool #) + offset

Pool ID Base address 1234 0xDEADBEEF 5678 0x12345678 … … Pool ID Offset Object ID

slide-28
SLIDE 28

Motivation - ObjectIDs

  • Permanent address:

ObjectID, (Pool ID, offset)

  • Translation: Address =

BaseAddressLookup(Pool #) + offset

Pool ID Base address 1234 0xDEADBEEF 5678 0x12345678 … … Hash Table search + Pool ID Offset Object ID 5678 Translated address

slide-29
SLIDE 29

Motivation - ObjectIDs

  • Permanent address:

ObjectID, (Pool ID, offset)

  • Translation: Address =

BaseAddressLookup(Pool #) + offset

  • Translation can be optimized

through either hardware or software support in prior works

Pool ID Base address 1234 0xDEADBEEF 5678 0x12345678 … … Hash Table search + Pool ID Offset Object ID 5678 Translated address

slide-30
SLIDE 30

Motivation - Programming burden

Address Space

text data BSS heap stack

Pool 1 Pool 2

slide-31
SLIDE 31

Motivation - Programming burden

Address Space

text data BSS heap stack

Pool 1 Pool 2

  • id1 = head (1, 10)
slide-32
SLIDE 32

Motivation - Programming burden

Address Space

text data BSS heap stack

Pool 1 Pool 2

  • id1 = head

check oid1(1, 10) Check&Map Pool 1

slide-33
SLIDE 33

Motivation - Programming burden

Address Space

text data BSS heap stack

Pool 1 Pool 2

  • id1 = head

check oid1 addr1 = translate oid1 (1, 10)

slide-34
SLIDE 34

Motivation - Programming burden

Address Space

text data BSS heap stack

Pool 1 Pool 2

  • id1 = head

check oid1 addr1 = translate oid1

  • id2 = load from addr1

(1, 20)

slide-35
SLIDE 35

Motivation - Programming burden

Address Space

text data BSS heap stack

Pool 1 Pool 2

  • id1 = head

check oid1 addr1 = translate oid1

  • id2 = load from addr1

check oid2 (1, 20)

slide-36
SLIDE 36

Motivation - Programming burden

Address Space

text data BSS heap stack

Pool 1 Pool 2

  • id1 = head

check oid1 addr1 = translate oid1

  • id2 = load from addr1

check oid2 addr2 = translate oid2 (1, 20)

slide-37
SLIDE 37

Motivation - Programming burden

Address Space

text data BSS heap stack

Pool 1 Pool 2

  • id1 = head

check oid1 addr1 = translate oid1

  • id2 = load from addr1

check oid2 addr2 = translate oid2

  • id3 = load from addr2

(2, 20)

slide-38
SLIDE 38

Motivation - Programming burden

Address Space

text data BSS heap stack

Pool 1 Pool 2

  • id1 = head

check oid1 addr1 = translate oid1

  • id2 = load from addr1

check oid2 addr2 = translate oid2

  • id3 = load from addr2

check oid3(2, 20) Check&Map Pool 2

slide-39
SLIDE 39

Motivation - Programming burden

Address Space

text data BSS heap stack

Pool 1 Pool 2

  • id1 = head

check oid1 addr1 = translate oid1

  • id2 = load from addr1

check oid2 addr2 = translate oid2

  • id3 = load from addr2

check oid3 addr3 = translate oid3 (2, 20)

slide-40
SLIDE 40

Motivation - Programming burden

Address Space

text data BSS heap stack

Pool 1 Pool 2

  • id1 = head

check oid1 addr1 = translate oid1

  • id2 = load from addr1

check oid2 addr2 = translate oid2

  • id3 = load from addr2

check oid3 addr3 = translate oid3 load from addr3 (2, 20)

slide-41
SLIDE 41

Motivation - Programming burden

Address Space

text data BSS heap stack

Pool 1 Pool 2

  • id1 = head

check oid1 addr1 = translate oid1

  • id2 = load from addr1

check oid2 addr2 = translate oid2

  • id3 = load from addr2

check oid3 addr3 = translate oid3 load from addr3

slide-42
SLIDE 42

Motivation - Programming burden

  • id1 = head

check oid1 addr1 = translate oid1

  • id2 = load from addr1

check oid2 addr2 = translate oid2

  • id3 = load from addr2

check oid3 addr3 = translate oid3 load from addr3 Routine to access on ObjectID:

  • Validation
  • Translation
  • Load/store data from it
slide-43
SLIDE 43

Motivation - Performance Overhead

  • Each validation adds overhead:
  • Check if the pool is mapped or not
  • If not,
  • Check permissions
  • Permission per user
  • Use Linux file permission: read, write, executable on the
  • wner, group and others: e.g. 644
  • If the user has permission, map the pool to the address space,

similar to memory-mapped files (kernel-level operation)

  • Otherwise, abort program immediately

check oid1; (1,10)

slide-44
SLIDE 44

Motivation - Performance Overhead

  • Each validation adds overhead:
  • Check if the pool is mapped or not
  • If not,
  • Check permissions
  • Permission per user
  • Use Linux file permission: read, write, executable on the
  • wner, group and others: e.g. 644
  • If the user has permission, map the pool to the address space,

similar to memory-mapped files (kernel-level operation)

  • Otherwise, abort program immediately

check oid1; (1,10)

  • 2. Check permissions
  • 3. Context switch
  • 1. Redundant check on pools
slide-45
SLIDE 45

Prior works - Leave it to programmers

  • id1 = head

check oid1 addr1 = translate oid1

  • id2 = load from addr1

check oid2 addr2 = translate oid2

  • id3 = load from addr2

check oid3 addr3 = translate oid3 load from addr3

slide-46
SLIDE 46

Prior works - Leave it to programmers

  • Prior works solve this problem by

leaving to programmers

  • id1 = head

check oid1 addr1 = translate oid1

  • id2 = load from addr1

check oid2 addr2 = translate oid2

  • id3 = load from addr2

check oid3 addr3 = translate oid3 load from addr3

slide-47
SLIDE 47

Prior works - Leave it to programmers

  • Prior works solve this problem by

leaving to programmers

  • Programmers have to check&map the

pools with names at the beginning of the program -> eliminates performance overhead

  • id1 = head

check oid1 addr1 = translate oid1

  • id2 = load from addr1

check oid2 addr2 = translate oid2

  • id3 = load from addr2

check oid3 addr3 = translate oid3 load from addr3

slide-48
SLIDE 48

Prior works - Leave it to programmers

  • Prior works solve this problem by

leaving to programmers

  • Programmers have to check&map the

pools with names at the beginning of the program -> eliminates performance overhead

  • id1 = head

addr1 = translate oid1

  • id2 = load from addr1

addr2 = translate oid2

  • id3 = load from addr2

addr3 = translate oid3 load from addr3

slide-49
SLIDE 49

Prior works - Leave it to programmers

  • Prior works solve this problem by

leaving to programmers

  • Programmers have to check&map the

pools with names at the beginning of the program -> eliminates performance overhead

  • id1 = head

addr1 = translate oid1

  • id2 = load from addr1

addr2 = translate oid2

  • id3 = load from addr2

addr3 = translate oid3 load from addr3 check-and-map “pool 1” check-and-map “pool 2” …

slide-50
SLIDE 50

Prior works - Leave it to programmers

  • Prior works solve this problem by

leaving to programmers

  • Programmers have to check&map the

pools with names at the beginning of the program -> eliminates performance overhead

  • Programming burden remains:
  • Programmers need to know what

pools to open

  • Possible source of bugs
  • id1 = head

addr1 = translate oid1

  • id2 = load from addr1

addr2 = translate oid2

  • id3 = load from addr2

addr3 = translate oid3 load from addr3 check-and-map “pool 1” check-and-map “pool 2” …

slide-51
SLIDE 51

Another approach - Automatic Permission Check

12

slide-52
SLIDE 52

Another approach - Automatic Permission Check

  • Automatic validation on all ObjectIDs

12

slide-53
SLIDE 53

Another approach - Automatic Permission Check

  • Automatic validation on all ObjectIDs

+ No need for programmers to reason about validation of ObjectIDs; all happen in hardware

  • Incur overhead to check permissions on all ObjectIDs

12

slide-54
SLIDE 54

Another approach - Automatic Permission Check

  • Automatic validation on all ObjectIDs

+ No need for programmers to reason about validation of ObjectIDs; all happen in hardware

  • Incur overhead to check permissions on all ObjectIDs

➡ Only check permission when a pool misses in translation → remove redundant checks on already mapped pools

12

slide-55
SLIDE 55

Another approach - Automatic Permission Check

  • Automatic validation on all ObjectIDs

+ No need for programmers to reason about validation of ObjectIDs; all happen in hardware

  • Incur overhead to check permissions on all ObjectIDs

➡ Only check permission when a pool misses in translation → remove redundant checks on already mapped pools

  • Overhead to map a pool during translation (context switch +

update to OS data structures)

12

slide-56
SLIDE 56

Another approach - Automatic Permission Check

  • Automatic validation on all ObjectIDs

+ No need for programmers to reason about validation of ObjectIDs; all happen in hardware

  • Incur overhead to check permissions on all ObjectIDs

➡ Only check permission when a pool misses in translation → remove redundant checks on already mapped pools

  • Overhead to map a pool during translation (context switch +

update to OS data structures) ➡ Hardware maps pools using their physical address, avoids OS interaction

12

slide-57
SLIDE 57

IMPLEMENTATION

  • Overview of SPOT
  • Design details of SPOT

13

slide-58
SLIDE 58

SPOT Overview

14

slide-59
SLIDE 59

SPOT Overview

  • Built on prior work of hardware-supported

translations

14

slide-60
SLIDE 60

SPOT Overview

  • Built on prior work of hardware-supported

translations

  • New instructions: nvld and nvst

14

slide-61
SLIDE 61

SPOT Overview

  • Built on prior work of hardware-supported

translations

  • New instructions: nvld and nvst
  • Small buffer near the core for translation:

POLB, similar to TLB

14

slide-62
SLIDE 62

SPOT Overview

  • Built on prior work of hardware-supported

translations

  • New instructions: nvld and nvst
  • Small buffer near the core for translation:

POLB, similar to TLB

  • System Persistent Object Table

(SPOT) ★One SPOT in whole system, because pool ID is unique

14

slide-63
SLIDE 63

SPOT Overview

  • Built on prior work of hardware-supported

translations

  • New instructions: nvld and nvst
  • Small buffer near the core for translation:

POLB, similar to TLB

  • System Persistent Object Table

(SPOT) ★One SPOT in whole system, because pool ID is unique ★Holds translation information of all pools (physical addresses)

14

slide-64
SLIDE 64

SPOT Overview

  • Built on prior work of hardware-supported

translations

  • New instructions: nvld and nvst
  • Small buffer near the core for translation:

POLB, similar to TLB

  • System Persistent Object Table

(SPOT) ★One SPOT in whole system, because pool ID is unique ★Holds translation information of all pools (physical addresses) ★Holds permissions of all pools (UNIX file permissions)

14

slide-65
SLIDE 65

SPOT Walk

  • When executing NVLD, Pool ID is

searched in POLB

NVLD

Pool ID Offset

Core Permanent Storage

Persistent Object Look-aside Buffer (POLB) System Persistent Object Table (POT)

15

slide-66
SLIDE 66

SPOT Walk

  • When executing NVLD, Pool ID is

searched in POLB

  • A pool entry misses in POLB = a pool is

unmapped in current process

NVLD

Pool ID Offset

Miss

Core

SPOT

Permanent Storage

POLB

15

slide-67
SLIDE 67

SPOT Walk

  • When executing NVLD, Pool ID is

searched in POLB

  • A pool entry misses in POLB = a pool is

unmapped in current process

  • Perform SPOT Walk:

NVLD

Pool ID Offset

Miss

Core

SPOT

Permanent Storage

SPOT Walk POLB

15

Pool ID

  • Phys. addr.

Pool ID

  • Phys. addr.

Permission

slide-68
SLIDE 68

SPOT Walk

  • When executing NVLD, Pool ID is

searched in POLB

  • A pool entry misses in POLB = a pool is

unmapped in current process

  • Perform SPOT Walk:
  • 1. Check permissions

NVLD

Pool ID Offset

Miss

Core

SPOT

Permanent Storage

SPOT Walk POLB

Check permission

15

Pool ID

  • Phys. addr.

Pool ID

  • Phys. addr.

Permission

slide-69
SLIDE 69

SPOT Walk

  • When executing NVLD, Pool ID is

searched in POLB

  • A pool entry misses in POLB = a pool is

unmapped in current process

  • Perform SPOT Walk:
  • 1. Check permissions
  • 2. Map the pool, by moving the

physical address to POLB (no need for context switch)

NVLD

Pool ID Offset

Miss

Core

SPOT

Permanent Storage

SPOT Walk Update POLB POLB

Consider the pool is mapped

15

Pool ID

  • Phys. addr.

Pool ID

  • Phys. addr.

Permission

slide-70
SLIDE 70

SPOT Walk

  • When executing NVLD, Pool ID is

searched in POLB

  • A pool entry misses in POLB = a pool is

unmapped in current process

  • Perform SPOT Walk:
  • 1. Check permissions
  • 2. Map the pool, by moving the

physical address to POLB (no need for context switch)

NVLD

Pool ID Offset

Send Translated Address to Access Memory

Miss

Core

+

SPOT

Permanent Storage

SPOT Walk Update POLB POLB

15

Pool ID

  • Phys. addr.

Pool ID

  • Phys. addr.

Permission

slide-71
SLIDE 71

Permission Check Logic

  • Hierarchical design of SPOT;
  • ne level of SPOT table has

entries with permission info

  • SPOT entry stores the owner

and group of the pool, along with the Owner Permission (OP), Group Permission (GP), and other permission (P).

  • Need OS to set protected

registers of the running program Running user ID Primary* group ID

  • Addr. of physical page frame

OP GP P

1 3 5 7 12 52 63

Group ID

64 127

Owner ID

96 SPOT Entry with permission info Protected register(s) * Considering a user might belong to multiple groups, select one of the group

16

slide-72
SLIDE 72

Permission Check Logic

  • First User ID is

compared against Owner ID

Running user ID

  • Addr. of physical page frame

OP GP P

1 3 5 7 12 52 63

Group ID

64 127

Owner ID

96 SPOT Entry with permission info

Owner ID

17

slide-73
SLIDE 73

Permission Check Logic

  • First User ID is

compared against Owner ID

Running user ID

  • Addr. of physical page frame

OP GP P

1 3 5 7 12 52 63

Group ID

64 127

Owner ID

96 SPOT Entry with permission info

Owner ID match?

17

slide-74
SLIDE 74

Permission Check Logic

  • First User ID is

compared against Owner ID

  • If matched, check the

Owner Permission (OP) to determine the read/ write permission of the pool

  • Addr. of physical page frame

OP

1 3 5 7 12 52 63

Group ID

64 127

Owner ID

96 SPOT Entry with permission info

User and owner matched

OP GP P 18

slide-75
SLIDE 75

Permission Check Logic

  • First User ID is

compared against Owner ID

  • If matched, check the

Owner Permission (OP) to determine the read/ write permission of the pool

  • Addr. of physical page frame

OP

1 3 5 7 12 52 63

Group ID

64 127

Owner ID

96 SPOT Entry with permission info

User and owner matched

OP GP P

= 00 ? Yes No permission, abort program

18

slide-76
SLIDE 76

Permission Check Logic

  • First User ID is

compared against Owner ID

  • If matched, check the

Owner Permission (OP) to determine the read/ write permission of the pool

  • Addr. of physical page frame

OP

1 3 5 7 12 52 63

Group ID

64 127

Owner ID

96 SPOT Entry with permission info

User and owner matched

OP GP P

= 00 ? Yes No permission, abort program No = 1x ? Allow write Read-only = 01 ?

18

slide-77
SLIDE 77

Permission Check Logic

  • First User ID is

compared against Owner ID

  • If User ID not matched,

check the primary group ID

  • Addr. of physical page frame

OP GP P

1 3 5 7 12 52 63

Group ID

64 127

Owner ID

96 SPOT Entry with permission info

Group ID Primary group ID

19

slide-78
SLIDE 78

Permission Check Logic

  • First User ID is

compared against Owner ID

  • If User ID not matched,

check the primary group ID

  • Addr. of physical page frame

OP GP P

1 3 5 7 12 52 63

Group ID

64 127

Owner ID

96 SPOT Entry with permission info

match? Group ID Primary group ID

19

slide-79
SLIDE 79

Permission Check Logic

  • First User ID is compared

against Owner ID

  • If user ID not matched,

check the primary group ID

  • If matched, check the

Group Permission (GP) to determine the read/write permission of the pool

  • Addr. of physical page frame

OP GP

1 3 5 7 12 52 63

Group ID

64 127

Owner ID

96 SPOT Entry with permission info

Primary group ID and Group ID matched

GP P 20

slide-80
SLIDE 80

Permission Check Logic

  • First User ID is compared

against Owner ID

  • If user ID not matched,

check the primary group ID

  • If matched, check the

Group Permission (GP) to determine the read/write permission of the pool

  • Addr. of physical page frame

OP GP

1 3 5 7 12 52 63

Group ID

64 127

Owner ID

96 SPOT Entry with permission info

Primary group ID and Group ID matched

GP P 20

slide-81
SLIDE 81

Permission Check Logic

  • First User ID is compared

against Owner ID

  • If user ID not matched,

check the primary group ID

  • If matched, check the

Group Permission (GP) to determine the read/write permission of the pool

  • Addr. of physical page frame

OP GP

1 3 5 7 12 52 63

Group ID

64 127

Owner ID

96 SPOT Entry with permission info

Primary group ID and Group ID matched = 00 ? Yes Trap to OS*

GP P

*Because the user and the owner might belong to other groups.

20

slide-82
SLIDE 82

Permission Check Logic

  • First User ID is compared

against Owner ID

  • If user ID not matched,

check the primary group ID

  • If matched, check the

Group Permission (GP) to determine the read/write permission of the pool

  • Addr. of physical page frame

OP GP

1 3 5 7 12 52 63

Group ID

64 127

Owner ID

96 SPOT Entry with permission info

Primary group ID and Group ID matched = 00 ? Yes Trap to OS* No = 1x ? Allow write Read-only = 01 ?

GP P

*Because the user and the owner might belong to other groups.

20

slide-83
SLIDE 83

More in the paper

  • If user ID and group ID both doesn’t match, check Other

Permission bits (P).

  • Hierarchical SPOT walk
  • Permission information and translation information stored

at different granularities

21

slide-84
SLIDE 84

EVALUATIONS

  • Methodology - Benchmarks and different designs
  • Overall Performance on out-of-order processors

22

slide-85
SLIDE 85

Methodology - Benchmarks

Three pool usage patterns for each microbenchmark:

  • ALL: all nodes in one pool
  • EACH: each node in

different pool (1000~10000 pools)

  • RANDOM: nodes are

randomly scattered in 32 pools

ALL EACH RANDOM * Each color represent one pool Benchmarks: Linked List, Red-Black Tree, B-Tree, B+ Tree, Binary Search Tree, String Position Swap and TPC-C and vacation

23

slide-86
SLIDE 86

Methodology - Comparisons

  • All assume programmers don’t open the pools with names; need

permission check on all ObjectIDs

24

Translation Scheme Permission Check Mapping SwT-Base Software translation Separate check before translation Trap to OS SwT-Opt Software translation Check permission during translation Trap to OS HwT Hardware translation Separate check before translation Trap to OS HwT+SPOT Hardware translation Check permission during translation Hardware

slide-87
SLIDE 87

Methodology - Comparisons

  • All assume programmers don’t open the pools with names; need

permission check on all ObjectIDs

24

Translation Scheme Permission Check Mapping SwT-Base Software translation Separate check before translation Trap to OS SwT-Opt Software translation Check permission during translation Trap to OS HwT Hardware translation Separate check before translation Trap to OS HwT+SPOT Hardware translation Check permission during translation Hardware

slide-88
SLIDE 88

Methodology - Comparisons

  • All assume programmers don’t open the pools with names; need

permission check on all ObjectIDs

24

Translation Scheme Permission Check Mapping SwT-Base Software translation Separate check before translation Trap to OS SwT-Opt Software translation Check permission during translation Trap to OS HwT Hardware translation Separate check before translation Trap to OS HwT+SPOT Hardware translation Check permission during translation Hardware

slide-89
SLIDE 89

Methodology - Comparisons

  • All assume programmers don’t open the pools with names; need

permission check on all ObjectIDs

24

Translation Scheme Permission Check Mapping SwT-Base Software translation Separate check before translation Trap to OS SwT-Opt Software translation Check permission during translation Trap to OS HwT Hardware translation Separate check before translation Trap to OS HwT+SPOT Hardware translation Check permission during translation Hardware

slide-90
SLIDE 90

Methodology - Comparisons

  • All assume programmers don’t open the pools with names; need

permission check on all ObjectIDs

24

Translation Scheme Permission Check Mapping SwT-Base Software translation Separate check before translation Trap to OS SwT-Opt Software translation Check permission during translation Trap to OS HwT Hardware translation Separate check before translation Trap to OS HwT+SPOT Hardware translation Check permission during translation Hardware

slide-91
SLIDE 91

Methodology - Comparisons

  • All assume programmers don’t open the pools with names; need

permission check on all ObjectIDs

24

Translation Scheme Permission Check Mapping SwT-Base Software translation Separate check before translation Trap to OS SwT-Opt Software translation Check permission during translation Trap to OS HwT Hardware translation Separate check before translation Trap to OS HwT+SPOT Hardware translation Check permission during translation Hardware

slide-92
SLIDE 92

Results - Out-of-order

Normalized to SwT-Base

0.5 1 1.5 2 2.5 3 B e n c h ( A L L ) B e n c h ( E A C H ) B e n c h ( R A N D O M )

SwT-Opt HwT HwT+SPOT

25

* Normalized to SwT-Base

slide-93
SLIDE 93

Results - Out-of-order

Normalized to SwT-Base

0.5 1 1.5 2 2.5 3 B e n c h ( A L L ) B e n c h ( E A C H ) B e n c h ( R A N D O M )

SwT-Opt HwT HwT+SPOT

  • No big impact on

ALL

25

* Normalized to SwT-Base

slide-94
SLIDE 94

Results - Out-of-order

Normalized to SwT-Base

0.5 1 1.5 2 2.5 3 B e n c h ( A L L ) B e n c h ( E A C H ) B e n c h ( R A N D O M )

SwT-Opt HwT HwT+SPOT

  • No big impact on

ALL

  • HwT is worse

than SwT-Opt because of unnecessary checks

25

* Normalized to SwT-Base

slide-95
SLIDE 95

Results - Out-of-order

Normalized to SwT-Base

0.5 1 1.5 2 2.5 3 B e n c h ( A L L ) B e n c h ( E A C H ) B e n c h ( R A N D O M )

SwT-Opt HwT HwT+SPOT

  • No big impact on

ALL

  • HwT is worse

than SwT-Opt because of unnecessary checks

  • HwT+SPOT is the

best, especially in RANDOM (2.9x)

25

* Normalized to SwT-Base

slide-96
SLIDE 96

Other Results

  • Comparison between performances on in-order and out-
  • f-order processors
  • Sensitivity analysis on page size
  • Storage overhead of SPOT

26

slide-97
SLIDE 97

Summary

  • Permanent pointers can point to unmapped regions, and

reasoning about them is a new programming burden

  • System Persistent Object Table (SPOT) holds all created pools

for fast permission checking and as backing store for translation

  • Evaluate permission checking and translation implementations

in both software and hardware and evaluate them

  • Show compelling 2.9x speedup on RANDOM workloads and

1.4x and 1.8x speedup on TPC-C and vacation

27

slide-98
SLIDE 98

THANK YOU!

Questions?