aboutsummaryrefslogtreecommitdiffstats
path: root/include/litmus/rt_param.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/litmus/rt_param.h')
-rw-r--r--include/litmus/rt_param.h26
1 files changed, 15 insertions, 11 deletions
diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h
index bf0ee8dbae6e..887075b908ca 100644
--- a/include/litmus/rt_param.h
+++ b/include/litmus/rt_param.h
@@ -36,6 +36,14 @@ typedef enum {
36} budget_policy_t; 36} budget_policy_t;
37 37
38typedef enum { 38typedef enum {
39 /* all drain mechanisms are ignored if budget enforcement or signalling
40 is not in use. */
41 DRAIN_SIMPLE, /* drains while task is linked */
42 DRAIN_SAWARE, /* drains according to suspension-aware analysis */
43 DRAIN_SOBLIV, /* drains according to suspension-obliv analysis */
44} budget_drain_policy_t;
45
46typedef enum {
39 NO_SIGNALS, /* job receives no signals when it exhausts its budget */ 47 NO_SIGNALS, /* job receives no signals when it exhausts its budget */
40 QUANTUM_SIGNALS, /* budget signals are only sent on quantum boundaries */ 48 QUANTUM_SIGNALS, /* budget signals are only sent on quantum boundaries */
41 PRECISE_SIGNALS, /* budget signals are triggered with hrtimers */ 49 PRECISE_SIGNALS, /* budget signals are triggered with hrtimers */
@@ -132,6 +140,7 @@ struct rt_task {
132 unsigned int priority; 140 unsigned int priority;
133 task_class_t cls; 141 task_class_t cls;
134 budget_policy_t budget_policy; /* ignored by pfair */ 142 budget_policy_t budget_policy; /* ignored by pfair */
143 budget_drain_policy_t drain_policy;
135 budget_signal_policy_t budget_signal_policy; /* currently ignored by pfair */ 144 budget_signal_policy_t budget_signal_policy; /* currently ignored by pfair */
136 release_policy_t release_policy; 145 release_policy_t release_policy;
137}; 146};
@@ -213,8 +222,9 @@ struct control_page {
213/* don't export internal data structures to user space (liblitmus) */ 222/* don't export internal data structures to user space (liblitmus) */
214#ifdef __KERNEL__ 223#ifdef __KERNEL__
215 224
216#include <litmus/binheap.h>
217#include <linux/semaphore.h> 225#include <linux/semaphore.h>
226#include <litmus/budget.h>
227#include <litmus/binheap.h>
218 228
219#ifdef CONFIG_LITMUS_SOFTIRQD 229#ifdef CONFIG_LITMUS_SOFTIRQD
220#include <linux/interrupt.h> 230#include <linux/interrupt.h>
@@ -247,15 +257,8 @@ struct rt_job {
247 * Increase this sequence number when a job is released. 257 * Increase this sequence number when a job is released.
248 */ 258 */
249 unsigned int job_no; 259 unsigned int job_no;
250
251 /* bits:
252 * 0th: Set if a budget exhaustion signal has already been sent for
253 * the current job. */
254 unsigned long flags;
255}; 260};
256 261
257#define RT_JOB_SIG_BUDGET_SENT 0
258
259struct pfair_param; 262struct pfair_param;
260 263
261enum klmirqd_sem_status 264enum klmirqd_sem_status
@@ -278,12 +281,12 @@ typedef enum gpu_migration_dist
278 MIG_LAST = MIG_NONE 281 MIG_LAST = MIG_NONE
279} gpu_migration_dist_t; 282} gpu_migration_dist_t;
280 283
281typedef struct feedback_est{ 284typedef struct feedback_est
285{
282 fp_t est; 286 fp_t est;
283 fp_t accum_err; 287 fp_t accum_err;
284} feedback_est_t; 288} feedback_est_t;
285 289
286
287#define AVG_EST_WINDOW_SIZE 20 290#define AVG_EST_WINDOW_SIZE 20
288 291
289typedef int (*notify_rsrc_exit_t)(struct task_struct* tsk); 292typedef int (*notify_rsrc_exit_t)(struct task_struct* tsk);
@@ -417,7 +420,6 @@ struct rt_param {
417 struct binheap_node aux_task_owner_node; 420 struct binheap_node aux_task_owner_node;
418#endif 421#endif
419 422
420
421#ifdef CONFIG_NP_SECTION 423#ifdef CONFIG_NP_SECTION
422 /* For the FMLP under PSN-EDF, it is required to make the task 424 /* For the FMLP under PSN-EDF, it is required to make the task
423 * non-preemptive from kernel space. In order not to interfere with 425 * non-preemptive from kernel space. In order not to interfere with
@@ -427,6 +429,8 @@ struct rt_param {
427 unsigned int kernel_np; 429 unsigned int kernel_np;
428#endif 430#endif
429 431
432 struct budget_tracker budget;
433
430 /* This field can be used by plugins to store where the task 434 /* This field can be used by plugins to store where the task
431 * is currently scheduled. It is the responsibility of the 435 * is currently scheduled. It is the responsibility of the
432 * plugin to avoid race conditions. 436 * plugin to avoid race conditions.