aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAndrea Bastoni <bastoni@cs.unc.edu>2010-06-24 19:50:19 -0400
committerAndrea Bastoni <bastoni@cs.unc.edu>2010-06-24 19:50:19 -0400
commitc176d77f446a9f218e0bd413bfad949b286e8326 (patch)
treee55aad93dd3a4fa410e54c01d97f687cf2669dbc /include
parent623b61db6649c1fd60791df965f38a06acb3ea93 (diff)
[NPS-F] Add rtspin and utility to add notional processors
- add syscall to add notional processors (servers) - add rtspin_npsf program to run on specified (npsf_id, cpu) - add npsf_add_server as wrapper on the syscall
Diffstat (limited to 'include')
-rw-r--r--include/litmus.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/litmus.h b/include/litmus.h
index 3aa790f..d7f7b99 100644
--- a/include/litmus.h
+++ b/include/litmus.h
@@ -45,6 +45,11 @@ int sporadic_task_ns_edffm(lt_t e, lt_t p, lt_t phase, int cpu,
45 task_class_t cls, budget_policy_t budget_policy, 45 task_class_t cls, budget_policy_t budget_policy,
46 int set_cpu_set); 46 int set_cpu_set);
47 47
48int sporadic_task_ns_npsf(
49 lt_t e, lt_t p, lt_t phase,
50 int cpu, task_class_t cls, int npsf_id,
51 budget_policy_t budget_policy, int set_cpu_set);
52
48/* budget enforcement off by default in these macros */ 53/* budget enforcement off by default in these macros */
49#define sporadic_global(e, p) \ 54#define sporadic_global(e, p) \
50 sporadic_task(e, p, 0, 0, RT_CLASS_SOFT, NO_ENFORCEMENT, 0) 55 sporadic_task(e, p, 0, 0, RT_CLASS_SOFT, NO_ENFORCEMENT, 0)
@@ -142,6 +147,26 @@ int null_call(cycles_t *timestamp);
142 */ 147 */
143struct control_page* get_ctrl_page(void); 148struct control_page* get_ctrl_page(void);
144 149
150/* NPS-F syscall to add a notional processor (a server) to a cpu.
151 * A notional processor may span across multiple cpu. If the NP.
152 * spans multiple cpus, each "segment" must be initialized indipendently
153 * with the proper fraction of budget of the original NP. For example:
154 *
155 * NP1 = 0.75 = inflated utilization; it spans on CPU0 and CPU1:
156 * NP1_0 = 0.2; NP1_1 = 0.55
157 *
158 * So, we have to initialize a segment (0.2 * slot_length) on CPU0
159 * and a segment (0.55 * slot_length) on CPU1 (both should have
160 * the same npsf_id).
161 *
162 * @npsf_id: a "unique" identifier for the notional processor.
163 * @budget: the length of the segment for this NP. on this CPU (in ns).
164 * @cpu: the cpu that holds this NP segment.
165 *
166 * Currently implemented on x86_64 only.
167 */
168int add_server(int *npsf_id, lt_t *budget, int *cpu);
169
145#ifdef __cplusplus 170#ifdef __cplusplus
146} 171}
147#endif 172#endif