43
Migration Process Chan Seok Kang

Migration Process Chan Seok Kang. 2Computer Systems and Platforms Lab Reference code Based on Version_MPB/Ver1 j-halt.S driver/net/rckmb.c prepMig.c writeIRQ.c

Embed Size (px)

Citation preview

Migration Process

Chan Seok Kang

2Computer Systems and Platforms Lab

Reference code

Based on Version_MPB/Ver1 j-halt.S driver/net/rckmb.c prepMig.c writeIRQ.c halt.c swapLUT.c / swapMGB.c resumefromHalt.c

3Computer Systems and Platforms Lab

Process

1-1. prepare to set Migration Flag (prepMig.c)

set src & dst pid

Create PrivMGB & InfoMGB

4Computer Systems and Platforms Lab

Process

1-2. write pid into InfoMGB (prepMig.c)

Mapping Memory Address & Write processor id in info_buf

5Computer Systems and Platforms Lab

Process

1-3. Set Flag

Mapping Memory Address & Write Migration Flag in priv_buf

6Computer Systems and Platforms Lab

Process

2-1. Send Interrupt Request (writeIRQ.c)

Define Config Register

7Computer Systems and Platforms Lab

Process

Interrupt request Portion of CRB

8Computer Systems and Platforms Lab

Process

2-2. Mapping Memory Address

9Computer Systems and Platforms Lab

Process

2-3. Set Interrupt Flag on Mapped Address

10Computer Systems and Platforms Lab

Process

3-1. Interrupt Handler operates in the driver(rckmb.c) Read migration Flag

11Computer Systems and Platforms Lab

Process

3-1. Interrupt Handler operates in the driver Check the flag

If flag sets PAUSE or RESUME, return 1else return 0

12Computer Systems and Platforms Lab

Process

3-2. Migration Process does not happened

13Computer Systems and Platforms Lab

Process

4-1. Halt operation (halt.c) Define the configure register address

14Computer Systems and Platforms Lab

Process

How to calculate the Config Register Address. BASE_ADDR = 0xE0000000

Reference for Config Register

15Computer Systems and Platforms Lab

Process

How to Calculate the Config Register Address SubAddress of Core configuration register

So we can get address from core number!

16Computer Systems and Platforms Lab

Process

4-2. Halt Operation Set the Clock Mask (~0x40)

Map Memory Address

Set the clock mask to stop

17Computer Systems and Platforms Lab

Process

5-1. In network driver(rckmb.c) Read migration Flag

18Computer Systems and Platforms Lab

Process

5-2. In network driver Check the flag

Return 1 ( set the halt flag)∵

19Computer Systems and Platforms Lab

Process

5-3. Migration Process happened

20Computer Systems and Platforms Lab

Process

5-4. Map the memory address

Status : halt

Status : resume

21Computer Systems and Platforms Lab

Process

5-5. Write Halt signal in the memory

Write Signal

Save esp

Flush L1 & L2 Cache

Save the register (external)

22Computer Systems and Platforms Lab

Process

6-1. Register Saving Process ( j-halt.S) Save the register into the argument address

Start this point

Save the register (external)

23Computer Systems and Platforms Lab

Process

6-1. Register Saving Registers

24Computer Systems and Platforms Lab

Process

6-2. Check the condition If flag == RUN, pass this process else check again.

So SRC / DST core halts during this session

26Computer Systems and Platforms Lab

Process

7-1. Swap LookupTable (SwapLUT.c)

Almost same process to gather config register addr Except for RCK_LUT

27Computer Systems and Platforms Lab

Process

How to get LUT register address BASE_ADDR = 0xE0000000

So we can get address from core number!

28Computer Systems and Platforms Lab

Process

7-1. Swap LookupTable (SwapLUT.c) Get SRC/DST aligned address

29Computer Systems and Platforms Lab

Process

7-1. Swap LookupTable (SwapLUT.c)

30Computer Systems and Platforms Lab

Process

Private LUT Entries of System Memory

31Computer Systems and Platforms Lab

Process

7-2. Swap Migration Buffer (swapMGB.c)

32Computer Systems and Platforms Lab

Process

7-2. Swap Migration Buffer (swapMGB.c) Idea : Utilize the unused shared Memory

33Computer Systems and Platforms Lab

Process

7-2. Swap Migration Buffer (swapMGB.c)

34Computer Systems and Platforms Lab

Process

8-1. Resume Process (resumeFromHalt.c)

35Computer Systems and Platforms Lab

Process

8-1.Resume Process

36Computer Systems and Platforms Lab

Process

8-1. Resume Process

37Computer Systems and Platforms Lab

Process

8-1. resume Process

38Computer Systems and Platforms Lab

Process

9. Pass through the halt process

39Computer Systems and Platforms Lab

Process

10. and also pass through the migration process in network driver.

40Computer Systems and Platforms Lab

Process

10. and also pass through the migration process in network driver.

41Computer Systems and Platforms Lab

Process

10. and also pass through the migration process in network driver.

42Computer Systems and Platforms Lab

Process

10. and also pass through the migration process in network driver.

43Computer Systems and Platforms Lab

Process

10. and also pass through the migration process in network driver.

44Computer Systems and Platforms Lab

Interest thing.

Difference Between Direct write in memory and us-ing systemcall(writel()) Writel() -> asm instruction (“movnti”) movnti instruction minimize the impact of processor`s data

cache(cache pollution) Direct write ex) **address = result

Just write the data whichever mov instruction like(just move)