diff options
Diffstat (limited to 'litmus')
-rw-r--r-- | litmus/Kconfig | 13 | ||||
-rw-r--r-- | litmus/sched_litmus.c | 8 |
2 files changed, 19 insertions, 2 deletions
diff --git a/litmus/Kconfig b/litmus/Kconfig index 5556ae5cba45..874794f64af1 100644 --- a/litmus/Kconfig +++ b/litmus/Kconfig | |||
@@ -2,6 +2,17 @@ menu "LITMUS^RT" | |||
2 | 2 | ||
3 | menu "Real-Time Synchronization" | 3 | menu "Real-Time Synchronization" |
4 | 4 | ||
5 | config NP_SECTION | ||
6 | bool "Non-preemptive section support" | ||
7 | default n | ||
8 | help | ||
9 | Allow tasks to become non-preemptable. | ||
10 | Note that plugins still need to explicitly support non-preemptivity. | ||
11 | Currently, only GSN-EDF and PSN-EDF have such support. | ||
12 | |||
13 | This is required to support the FMLP. | ||
14 | If disabled, all tasks will be considered preemptable at all times. | ||
15 | |||
5 | config SRP | 16 | config SRP |
6 | bool "Stack Resource Policy (SRP)" | 17 | bool "Stack Resource Policy (SRP)" |
7 | default n | 18 | default n |
@@ -13,7 +24,7 @@ config SRP | |||
13 | 24 | ||
14 | config FMLP | 25 | config FMLP |
15 | bool "FMLP support" | 26 | bool "FMLP support" |
16 | # depends on NP_SECTION | 27 | depends on NP_SECTION |
17 | default n | 28 | default n |
18 | help | 29 | help |
19 | Include support for deterministic multiprocessor real-time | 30 | Include support for deterministic multiprocessor real-time |
diff --git a/litmus/sched_litmus.c b/litmus/sched_litmus.c index 64ad5db07795..c1fc7748e590 100644 --- a/litmus/sched_litmus.c +++ b/litmus/sched_litmus.c | |||
@@ -177,7 +177,13 @@ static void dequeue_task_litmus(struct rq *rq, struct task_struct *p, int sleep) | |||
177 | static void yield_task_litmus(struct rq *rq) | 177 | static void yield_task_litmus(struct rq *rq) |
178 | { | 178 | { |
179 | BUG_ON(rq->curr != current); | 179 | BUG_ON(rq->curr != current); |
180 | litmus->complete_job(); | 180 | /* sched_yield() is called to trigger delayed preemptions. |
181 | * Thus, mark the current task as needing to be rescheduled. | ||
182 | * This will cause the scheduler plugin to be invoked, which can | ||
183 | * then determine if a preemption is still required. | ||
184 | */ | ||
185 | clear_exit_np(current); | ||
186 | set_tsk_need_resched(current); | ||
181 | } | 187 | } |
182 | 188 | ||
183 | /* Plugins are responsible for this. | 189 | /* Plugins are responsible for this. |