diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-06-02 19:54:00 -0400 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-06-02 19:54:00 -0400 |
commit | 6a760787264bdbe8d206d0073a51e5d4bdd1c382 (patch) | |
tree | 34634da5307cc71052c9714391b606493324a381 | |
parent | 4c0bcddb6feeef54cebca39385c1bda0392dee15 (diff) |
PGM produce/consume data structures.
-rw-r--r-- | include/litmus/rt_param.h | 37 | ||||
-rw-r--r-- | litmus/Kconfig | 18 |
2 files changed, 55 insertions, 0 deletions
diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h index d6d799174160..bc84bfc358a3 100644 --- a/include/litmus/rt_param.h +++ b/include/litmus/rt_param.h | |||
@@ -33,6 +33,38 @@ typedef enum { | |||
33 | PRECISE_ENFORCEMENT /* budgets are enforced with hrtimers */ | 33 | PRECISE_ENFORCEMENT /* budgets are enforced with hrtimers */ |
34 | } budget_policy_t; | 34 | } budget_policy_t; |
35 | 35 | ||
36 | #ifdef CONFIG_PGM | ||
37 | |||
38 | #define MAX_FAN CONFIG_MAX_PGM_FAN | ||
39 | #define FAN_BYTES (((MAX_FAN)/8) + ((MAX_FAN)%8 != 0)) | ||
40 | |||
41 | struct pgm_production | ||
42 | { | ||
43 | struct task_struct* child; /* task that receives tokens */ | ||
44 | int nr_tokens; /* num tokens to generate */ | ||
45 | }; | ||
46 | |||
47 | struct pgm_produce | ||
48 | { | ||
49 | int nr_productions; /* num productions/children */ | ||
50 | struct pgm_production produce[0]; /* array of productions */ | ||
51 | }; | ||
52 | |||
53 | struct pgm_consumption | ||
54 | { | ||
55 | int required; /* number tokens required before firing */ | ||
56 | atomic_t token_countdown; /* consumption constraint met when <= 0 */ | ||
57 | }; | ||
58 | |||
59 | struct pgm_consume | ||
60 | { | ||
61 | int nr_consumptions; /* num of consumption constraints */ | ||
62 | char satisfied[FAN_BYTES]; /* bit-array of satisfied constraints; | ||
63 | bit == 0 means satisfied! */ | ||
64 | struct pgm_consumption consume[0]; /* array of consumption constraints */ | ||
65 | }; | ||
66 | #endif | ||
67 | |||
36 | struct rt_task { | 68 | struct rt_task { |
37 | lt_t exec_cost; | 69 | lt_t exec_cost; |
38 | lt_t period; | 70 | lt_t period; |
@@ -40,6 +72,11 @@ struct rt_task { | |||
40 | unsigned int cpu; | 72 | unsigned int cpu; |
41 | task_class_t cls; | 73 | task_class_t cls; |
42 | budget_policy_t budget_policy; /* ignored by pfair */ | 74 | budget_policy_t budget_policy; /* ignored by pfair */ |
75 | |||
76 | #ifdef CONFIG_PGM | ||
77 | struct pgm_produce *produce; | ||
78 | struct pgm_consume *consume; | ||
79 | #endif | ||
43 | }; | 80 | }; |
44 | 81 | ||
45 | union np_flag { | 82 | union np_flag { |
diff --git a/litmus/Kconfig b/litmus/Kconfig index 68459d4dca41..9763b71b8732 100644 --- a/litmus/Kconfig +++ b/litmus/Kconfig | |||
@@ -34,6 +34,24 @@ config RELEASE_MASTER | |||
34 | (http://www.cs.unc.edu/~anderson/papers.html). | 34 | (http://www.cs.unc.edu/~anderson/papers.html). |
35 | Currently only supported by GSN-EDF. | 35 | Currently only supported by GSN-EDF. |
36 | 36 | ||
37 | config PGM | ||
38 | bool "PGM Scheduling" | ||
39 | default y | ||
40 | help | ||
41 | Enable support for (acyclic) Processing Graph Method scheduling. Only | ||
42 | early releasing is supported for non-source tasks, still preseving | ||
43 | real-time analysis (under EDF scheduling). | ||
44 | |||
45 | If unsure, say Yes. | ||
46 | |||
47 | config MAX_PGM_FAN | ||
48 | int "Maximum fan in/out" | ||
49 | depends on PGM | ||
50 | range 1 128 | ||
51 | default 32 | ||
52 | help | ||
53 | Maximum degree of fan in/out of a single PGM node. | ||
54 | |||
37 | endmenu | 55 | endmenu |
38 | 56 | ||
39 | menu "Real-Time Synchronization" | 57 | menu "Real-Time Synchronization" |