[Gems-users] Question about coherency protocols


Date: Wed, 6 Jul 2011 12:52:54 +0430
From: Hamid Reza Khaleghzadeh <khaleghzadeh@xxxxxxxxx>
Subject: [Gems-users] Question about coherency protocols
Hi

I have created a quad core processor as following:
ruby0.setparam g_NUM_PROCESSORS 8
ruby0.setparam g_PROCS_PER_CHIP 2
ruby0.setparam g_MEMORY_SIZE_BYTES 4294967296
ruby0.setparam NUMBER_OF_VIRTUAL_NETWORKS 5
ruby0.setparam g_NUM_L2_BANKS 2
ruby0.setparam g_NUM_MEMORIES 2

I have used MESI as coherency protocol.

Now, I have a question about coherency protocol. I have written two application as below:


APP1:
for (i=0;i<5;i++)
{
      THREAD1;     // thread1 read a large array. Size of the array is smaller than L2 cache.
      THREAD2;    // thread2 read the array that read by thread1
}

APP2:
for (i=0;i<5;i++)
{
      THREAD1;     // thread1 write into a large array. Size of the array is smaller than L2 cache.
      THREAD2;    // thread2 read filled array by thread1
}

I have run these apps two times, separately. First time, Thread1 and Thread2 are mapped on two cores that belong to same chip (there is a shared L2 between them). In another run, I have bound these two threads to two cores that don't belong to same chip ( L2 is not shared between them). I thought performance (execution time) of App2 is reduced more than performance of App1 when executed on the cores that have not any shared L2 cache. But performance of App1 is reduced more that App2 ones. It's clear that remote access of App1 is smaller than App2 when bound on separate L2 caches. Therefore, performance of App1 must decrease less than App2. Could you tell me why this happen. Please help me.
By the way, first, Thread1 is executed and then thread2 started to execute.


Sorry to bother you and thanks for your answer in advance.
[← Prev in Thread] Current Thread [Next in Thread→]
  • [Gems-users] Question about coherency protocols, Hamid Reza Khaleghzadeh <=