aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2011-04-26 17:13:13 -0400
committerGlenn Elliott <gelliott@cs.unc.edu>2011-04-26 17:13:13 -0400
commit282af7758c11caace9f96b680e3a4b472c3a344b (patch)
tree53292f413d22fd5bfc691c3f7fa16d212547a183 /include
parent0640d8f6441b2c8865feccbbd50388acc7404510 (diff)
Not detecting L3 cache level since L1 has two levels.
Diffstat (limited to 'include')
-rw-r--r--include/litmus/affinity.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/include/litmus/affinity.h b/include/litmus/affinity.h
index 2bcb09c70046..1a771919084a 100644
--- a/include/litmus/affinity.h
+++ b/include/litmus/affinity.h
@@ -3,12 +3,18 @@
3 3
4#include <linux/cpumask.h> 4#include <linux/cpumask.h>
5 5
6#define MAX_CACHE_DEPTH 3 6/*
7 L1 (instr) = depth 0
8 L1 (data) = depth 1
9 L2 = depth 2
10 L3 = depth 3
11 */
12#define NUM_CACHE_LEVELS 4
7 13
8struct neighborhood 14struct neighborhood
9{ 15{
10 unsigned int size[MAX_CACHE_DEPTH]; 16 unsigned int size[NUM_CACHE_LEVELS];
11 cpumask_var_t neighbors[MAX_CACHE_DEPTH]; 17 cpumask_var_t neighbors[NUM_CACHE_LEVELS];
12}; 18};
13 19
14/* topology info is stored redundently in a big array for fast lookups */ 20/* topology info is stored redundently in a big array for fast lookups */
@@ -34,7 +40,7 @@ Set release_master = -1 for no RM.
34 struct neighborhood* __neighbors = &neigh_info[(start)->cpu]; \ 40 struct neighborhood* __neighbors = &neigh_info[(start)->cpu]; \
35 (nearest) = NULL; \ 41 (nearest) = NULL; \
36 \ 42 \
37 for(__level = 0; (__level < MAX_CACHE_DEPTH) && !(nearest); ++__level) \ 43 for(__level = 0; (__level < NUM_CACHE_LEVELS) && !(nearest); ++__level) \
38 { \ 44 { \
39 if(__neighbors->size[__level] > 1) \ 45 if(__neighbors->size[__level] > 1) \
40 { \ 46 { \