• No results found

4.2 Process variation aware NUCA

4.2.3 DPVA-NUCA-2

The date migration in DPVA-NUCA-1 is determined by only write accesses. Note that many programs are read access dominant. Moreover, the read access latency variation with its physical location is mainly determined by the difference of latwiresince latc,ris much smaller

and uniform in different banks. Thus, DPVA-NUCA-1 solely based on write accesses might not obtain the best system performance and the least energy consumption. We proposed another dynamic process variation aware NUCA (DPVA-NUCA-2) to balance the read and write requests. Moreover, data blocks are aggressively move to fastest cache block according to the access situation to further improve the performance.

Algorithm 2 is an aggresive promotion algorithm used for DPVA-NUCA-2. The data blocks are classified into three types: read intensive, write intensive, and not access intensive. We use two queues, namely, read prediction queue and write prediction queue to record the read and write access histories, respectively. An incoming read or write hit triggers the address searching in both read queue and write queue. (a) If the block address is in the read queue and its corresponding counter is above threshold, the block is read intensive. We will move it to the cache block with the minimal read access latency LatR, as the dash black

arrow illustrated in Figure28(b). (b) Otherwise, if the data is not read intensive, but we can find it in write queue with a counter value beyond threshold, the data is write intensive. We will move it toward the cache block with the minimal write access latency LatW, as the solid

black arrow illustrated in Figure 28(b). (c) If the data is neither read intensive nor write intensive, no data migration is needed. The proposed DPVA-NUCA-2 grants higher priority to read accesses than that of write ones. This is because usually read is more frequent and more critical to system performance. So, if a data block is both read and write intensive, the data migration will be determined by LatR. LRU block will be replaced during write or

read miss. Sorting recorder is needed by DPVA-NUCA-2.

Write and read prediction queues: The two prediction queues have the same hard- ware structure – have a repository to store recent accessed block address and associated with corresponding counter. An incoming access can trigger the increment of the corresponding counter if the accessing block is already in the queue. Otherwise, a new entry will be added

if the queue is not full. If the queue is full, the LRU entry will be evicted. As we shall show in Section7.3, a small number of entries, i.e., 32, is efficient enough for read and write queues. The queue is CAM structure, so the searching of the queue is quick and within 1 clock cycle.

Conflict reduction: For DPVA-NUCA-2, it is possible that two or more cores compete for one cache block location with minimum LatW. In such a situation, the write-intensive

data blocks held by these two cores may take each other replaced alternatively, resulting in unexpected cache misses. To reduce those conflicts, we can simply attach a counter to record its cache miss numbers. If the miss numbers of several cores increase simultaneously, we check if there are conflict of write intensive blocks in their write queues. If it happens to be the scenario, some data will be moved to block with the second minimum LatW in

a round robin manner. If the miss rate keep on high, the data will be further demoted to cache block with larger LatW.

Bank 0 Bank 30

Bank 1 Bank 31

DPVA-NUCA-2

Block require longest latc,w Block require shortest latc,w

Bank 0 Bank 30 Bank 1 Bank 31 DPVA-NUCA-1

(a)

(b)

Bank 2 Bank 3 Bank 4 Bank 5 Bank 2 Bank 3 Bank 4

Core

Bank 28 Bank 29 Bank 28 Bank 29

Core

(1) Bank 5 (2) (3) (1) 1st swap (2) 2rd swap (3) Nth swap (a)

(a) Aggressive promotion (W)

(a) (b) (c)

(a) 1st demotion

(b) (N-1)th demotion

(c) Nth demotion

Bank far from core Bank close to core

(d) Aggressive promotion (R) (d)

Definitions:

CB(LatW,min): the cache block with the minimal write latency. CB(LatR,min): the cache block with the minimal read latency.

CB(LatW,next): the cache block with the second smallest write latency. Algorithm 1: Conservative Promotion used in DPVA-NUCA-1. 1 if write(hit)

2 if data is not in CB(LatW,min) then

3 swap data in CB(LatW) with the one in CB(LatW,next) 4 end if

5 end if

6 if write(miss) then

7 replace the LRU data block 8 end if

Algorithm 2: Aggressive Prediction for DPVA-NUCA-2. 1 if hit

2 if data is read intensive block then 3 move data into CB(LatR,min)

4 else if data is write intensive block then 5 move data into CB(LatW,min)

6 end if 7 if write(hit)

8 if access address is in the write prediction queue then 9 corresponding queue counter ++

10 else then

11 if queue is full then

12 kick LRU entry and fill the entry with incoming address 13 else then

14 add new entry with incoming address

15 end if

16 end if

17 if read(hit) then

18 do exact same operation in read prediction queue 19 end if

20 end if 21 if miss then

22 replace the LRU data block 23 end if

Related documents