aboutsummaryrefslogtreecommitdiffstats
path: root/include/litmus
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2011-01-27 16:23:46 -0500
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2011-02-01 17:00:27 -0500
commit343d4ead3b12992f494134114cf50e4f37c656c5 (patch)
tree16ccd57dfa39ba8c50b87ac776b13a2e3826fc01 /include/litmus
parent4ce37704ec0bedb28b5708d32964fca471e793d0 (diff)
Litmus core: add generic clustering support
Inspired by the existing C-EDF code, this generic version will build clusters of CPUs based on a given cache level.
Diffstat (limited to 'include/litmus')
-rw-r--r--include/litmus/clustered.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/litmus/clustered.h b/include/litmus/clustered.h
index cad12467b4ee..0c18dcb15e6c 100644
--- a/include/litmus/clustered.h
+++ b/include/litmus/clustered.h
@@ -19,4 +19,26 @@ const char* cache_level_name(enum cache_level level);
19struct proc_dir_entry* create_cluster_file(struct proc_dir_entry* parent, 19struct proc_dir_entry* create_cluster_file(struct proc_dir_entry* parent,
20 enum cache_level* level); 20 enum cache_level* level);
21 21
22
23
24struct scheduling_cluster {
25 unsigned int id;
26 /* list of CPUs that are part of this cluster */
27 struct list_head cpus;
28};
29
30struct cluster_cpu {
31 unsigned int id; /* which CPU is this? */
32 struct list_head cluster_list; /* List of the CPUs in this cluster. */
33 struct scheduling_cluster* cluster; /* The cluster that this CPU belongs to. */
34};
35
36int get_cluster_size(enum cache_level level);
37
38int assign_cpus_to_clusters(enum cache_level level,
39 struct scheduling_cluster* clusters[],
40 unsigned int num_clusters,
41 struct cluster_cpu* cpus[],
42 unsigned int num_cpus);
43
22#endif 44#endif