From c176d77f446a9f218e0bd413bfad949b286e8326 Mon Sep 17 00:00:00 2001 From: Andrea Bastoni Date: Thu, 24 Jun 2010 19:50:19 -0400 Subject: [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 --- include/litmus.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'include') 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, task_class_t cls, budget_policy_t budget_policy, int set_cpu_set); +int sporadic_task_ns_npsf( + lt_t e, lt_t p, lt_t phase, + int cpu, task_class_t cls, int npsf_id, + budget_policy_t budget_policy, int set_cpu_set); + /* budget enforcement off by default in these macros */ #define sporadic_global(e, p) \ sporadic_task(e, p, 0, 0, RT_CLASS_SOFT, NO_ENFORCEMENT, 0) @@ -142,6 +147,26 @@ int null_call(cycles_t *timestamp); */ struct control_page* get_ctrl_page(void); +/* NPS-F syscall to add a notional processor (a server) to a cpu. + * A notional processor may span across multiple cpu. If the NP. + * spans multiple cpus, each "segment" must be initialized indipendently + * with the proper fraction of budget of the original NP. For example: + * + * NP1 = 0.75 = inflated utilization; it spans on CPU0 and CPU1: + * NP1_0 = 0.2; NP1_1 = 0.55 + * + * So, we have to initialize a segment (0.2 * slot_length) on CPU0 + * and a segment (0.55 * slot_length) on CPU1 (both should have + * the same npsf_id). + * + * @npsf_id: a "unique" identifier for the notional processor. + * @budget: the length of the segment for this NP. on this CPU (in ns). + * @cpu: the cpu that holds this NP segment. + * + * Currently implemented on x86_64 only. + */ +int add_server(int *npsf_id, lt_t *budget, int *cpu); + #ifdef __cplusplus } #endif -- cgit v1.2.2