From 023552a4de5d217f6d7d954b66b1c33882cd5124 Mon Sep 17 00:00:00 2001 From: Thomas Preud'homme Date: Wed, 2 Mar 2011 12:49:09 +0100 Subject: [PATCH] [commtech] Prevent prefetch in batch queue Prevent prefetch of state variable in BatchQueue by adding padding between the buffers and state variable. --- communication_techniques/include/batch_queue_comm.h | 1 + 1 file changed, 1 insertion(+) diff --git a/communication_techniques/include/batch_queue_comm.h b/communication_techniques/include/batch_queue_comm.h index 9d552d2..f96249f 100644 --- a/communication_techniques/include/batch_queue_comm.h +++ b/communication_techniques/include/batch_queue_comm.h @@ -15,6 +15,7 @@ struct channel { void * volatile buf[2 * BUF_SIZE / sizeof(void *)] __attribute__ ((aligned (CACHE_LINE_SIZE))); + int unused[20] __attribute__ ((aligned (CACHE_LINE_SIZE))); volatile int state __attribute__ ((aligned (CACHE_LINE_SIZE))); int idx __attribute__ ((aligned (CACHE_LINE_SIZE))); };