From 4ce37704ec0bedb28b5708d32964fca471e793d0 Mon Sep 17 00:00:00 2001 From: "Bjoern B. Brandenburg" Date: Wed, 26 Jan 2011 20:42:49 -0500 Subject: Litmus core: extract userspace interface from C-EDF Make the cluster size configuration in C-EDF generic so that it can be used by other clustered schedulers. --- include/litmus/clustered.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 include/litmus/clustered.h (limited to 'include/litmus') diff --git a/include/litmus/clustered.h b/include/litmus/clustered.h new file mode 100644 index 000000000000..cad12467b4ee --- /dev/null +++ b/include/litmus/clustered.h @@ -0,0 +1,22 @@ +#ifndef CLUSTERED_H +#define CLUSTERED_H + +/* Which cache level should be used to group CPUs into clusters? + * GLOBAL_CLUSTER means that all CPUs form a single cluster (just like under + * global scheduling). + */ +enum cache_level { + GLOBAL_CLUSTER = 0, + L1_CLUSTER = 1, + L2_CLUSTER = 2, + L3_CLUSTER = 3 +}; + +int parse_cache_level(const char *str, enum cache_level *level); +const char* cache_level_name(enum cache_level level); + +/* expose a cache level in a /proc dir */ +struct proc_dir_entry* create_cluster_file(struct proc_dir_entry* parent, + enum cache_level* level); + +#endif -- cgit v1.2.2