diff options
Diffstat (limited to 'litmus/Kconfig')
-rw-r--r-- | litmus/Kconfig | 212 |
1 files changed, 211 insertions, 1 deletions
diff --git a/litmus/Kconfig b/litmus/Kconfig index bd6635c8de08..594c54342bdc 100644 --- a/litmus/Kconfig +++ b/litmus/Kconfig | |||
@@ -34,8 +34,70 @@ 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 REALTIME_AUX_TASKS | ||
38 | bool "Real-Time Auxillary Tasks" | ||
39 | depends on LITMUS_LOCKING | ||
40 | default n | ||
41 | help | ||
42 | Adds a system call that forces all non-real-time threads in a process | ||
43 | to become auxillary real-time tasks. These tasks inherit the priority of | ||
44 | the highest-prio *BLOCKED* (but NOT blocked on a Litmus lock) real-time | ||
45 | task (non-auxillary) in the process. This allows the integration of COTS | ||
46 | code that has background helper threads used primarily for message passing | ||
47 | and synchronization. If these background threads are NOT real-time scheduled, | ||
48 | then unbounded priority inversions may occur if a real-time task blocks on | ||
49 | a non-real-time thread. | ||
50 | |||
51 | Beware of the following pitfalls: | ||
52 | 1) Auxillary threads should not be CPU intensive. They should mostly | ||
53 | block on mutexes and condition variables. Violating this will | ||
54 | likely prevent meaningful analysis. | ||
55 | 2) Since there may be more than one auxillary thread per process, | ||
56 | priority inversions may occur with respect to single-threaded | ||
57 | task models if/when one of threads are scheduled simultanously | ||
58 | with another of the same identity. | ||
59 | |||
60 | choice | ||
61 | prompt "Scheduling prioritization of AUX tasks." | ||
62 | default REALTIME_AUX_TASK_PRIORITY_BOOSTED | ||
63 | help | ||
64 | Select the prioritization method for auxillary tasks. | ||
65 | |||
66 | config REALTIME_AUX_TASK_PRIORITY_BOOSTED | ||
67 | bool "Boosted" | ||
68 | help | ||
69 | Run all auxillary task threads at a maximum priority. Useful for | ||
70 | temporarily working around bugs during development. | ||
71 | |||
72 | config REALTIME_AUX_TASK_PRIORITY_INHERITANCE | ||
73 | bool "Inheritance" | ||
74 | help | ||
75 | Auxillary tasks inherit the maximum priority from blocked real-time | ||
76 | threads within the same process. | ||
77 | |||
78 | Additional pitfall: | ||
79 | 3) Busy-wait deadlock is likely between normal real-time tasks and | ||
80 | auxillary tasks synchronize using _preemptive_ spinlocks that do | ||
81 | not use priority inheritance. | ||
82 | |||
83 | These pitfalls are mitgated by the fact that auxillary tasks only | ||
84 | inherit priorities from blocked tasks (Blocking signifies that the | ||
85 | blocked task _may_ be waiting on an auxillary task to perform some | ||
86 | work.). Futher, auxillary tasks without an inherited priority are | ||
87 | _always_ scheduled with a priority less than any normal real-time task!! | ||
88 | |||
89 | NOTE: Aux tasks do not _directly_ inherit a priority from rt tasks that | ||
90 | are blocked on Litmus locks. Aux task should be COTS code that know nothing | ||
91 | of Litmus, so they won't hold Litmus locks. Nothing the aux task can do can | ||
92 | _directly_ unblock the rt task blocked on a Litmus lock. However, the lock | ||
93 | holder that blocks the rt task CAN block on I/O and contribute its priority | ||
94 | to the aux tasks. Aux tasks may still _indirectly_ inherit the priority of | ||
95 | the blocked rt task via the lock holder. | ||
96 | endchoice | ||
97 | |||
37 | endmenu | 98 | endmenu |
38 | 99 | ||
100 | |||
39 | menu "Real-Time Synchronization" | 101 | menu "Real-Time Synchronization" |
40 | 102 | ||
41 | config NP_SECTION | 103 | config NP_SECTION |
@@ -60,6 +122,42 @@ config LITMUS_LOCKING | |||
60 | Say Yes if you want to include locking protocols such as the FMLP and | 122 | Say Yes if you want to include locking protocols such as the FMLP and |
61 | Baker's SRP. | 123 | Baker's SRP. |
62 | 124 | ||
125 | config LITMUS_AFFINITY_LOCKING | ||
126 | bool "Enable affinity infrastructure in k-exclusion locking protocols." | ||
127 | depends on LITMUS_LOCKING | ||
128 | default n | ||
129 | help | ||
130 | Enable affinity tracking infrastructure in k-exclusion locking protocols. | ||
131 | This only enabled the *infrastructure* not actual affinity algorithms. | ||
132 | |||
133 | If unsure, say No. | ||
134 | |||
135 | config LITMUS_NESTED_LOCKING | ||
136 | bool "Support for nested inheritance in locking protocols" | ||
137 | depends on LITMUS_LOCKING | ||
138 | default n | ||
139 | help | ||
140 | Enable nested priority inheritance. | ||
141 | |||
142 | config LITMUS_DGL_SUPPORT | ||
143 | bool "Support for dynamic group locks" | ||
144 | depends on LITMUS_NESTED_LOCKING | ||
145 | default n | ||
146 | help | ||
147 | Enable dynamic group lock support. | ||
148 | |||
149 | config LITMUS_MAX_DGL_SIZE | ||
150 | int "Maximum size of a dynamic group lock." | ||
151 | depends on LITMUS_DGL_SUPPORT | ||
152 | range 1 128 | ||
153 | default "10" | ||
154 | help | ||
155 | Dynamic group lock data structures are allocated on the process | ||
156 | stack when a group is requested. We set a maximum size of | ||
157 | locks in a dynamic group lock to avoid dynamic allocation. | ||
158 | |||
159 | TODO: Batch DGL requests exceeding LITMUS_MAX_DGL_SIZE. | ||
160 | |||
63 | endmenu | 161 | endmenu |
64 | 162 | ||
65 | menu "Performance Enhancements" | 163 | menu "Performance Enhancements" |
@@ -112,6 +210,14 @@ choice | |||
112 | Break ties between two jobs, A and B, with equal deadlines by using a | 210 | Break ties between two jobs, A and B, with equal deadlines by using a |
113 | uniform hash; i.e.: hash(A.pid, A.job_num) < hash(B.pid, B.job_num). Job | 211 | uniform hash; i.e.: hash(A.pid, A.job_num) < hash(B.pid, B.job_num). Job |
114 | A has ~50% of winning a given tie-break. | 212 | A has ~50% of winning a given tie-break. |
213 | |||
214 | NOTES: | ||
215 | * This method doesn't work very well if a tied job has a low-valued | ||
216 | hash while the jobs it ties with do not make progress (that is, | ||
217 | they don't increment to new job numbers). The job with a low-valued | ||
218 | hash job will lose most tie-breaks. This is usually not a problem | ||
219 | unless you are doing something funky in Litmus (ex. worker threads | ||
220 | that do not increment job numbers). | ||
115 | 221 | ||
116 | config EDF_PID_TIE_BREAK | 222 | config EDF_PID_TIE_BREAK |
117 | bool "PID-based Tie Breaks" | 223 | bool "PID-based Tie Breaks" |
@@ -167,7 +273,7 @@ config SCHED_TASK_TRACE | |||
167 | config SCHED_TASK_TRACE_SHIFT | 273 | config SCHED_TASK_TRACE_SHIFT |
168 | int "Buffer size for sched_trace_xxx() events" | 274 | int "Buffer size for sched_trace_xxx() events" |
169 | depends on SCHED_TASK_TRACE | 275 | depends on SCHED_TASK_TRACE |
170 | range 8 13 | 276 | range 8 15 |
171 | default 9 | 277 | default 9 |
172 | help | 278 | help |
173 | 279 | ||
@@ -279,4 +385,108 @@ config PREEMPT_STATE_TRACE | |||
279 | 385 | ||
280 | endmenu | 386 | endmenu |
281 | 387 | ||
388 | menu "Interrupt Handling" | ||
389 | |||
390 | choice | ||
391 | prompt "Scheduling of interrupt bottom-halves in Litmus." | ||
392 | default LITMUS_SOFTIRQD_NONE | ||
393 | depends on LITMUS_LOCKING | ||
394 | help | ||
395 | Schedule tasklets with known priorities in Litmus. | ||
396 | |||
397 | config LITMUS_SOFTIRQD_NONE | ||
398 | bool "No tasklet scheduling in Litmus." | ||
399 | help | ||
400 | Don't schedule tasklets in Litmus. Default. | ||
401 | |||
402 | config LITMUS_SOFTIRQD | ||
403 | bool "Spawn klmirqd interrupt handling threads." | ||
404 | help | ||
405 | Create klmirqd interrupt handling threads. Work must be | ||
406 | specifically dispatched to these workers. (Softirqs for | ||
407 | Litmus tasks are not magically redirected to klmirqd.) | ||
408 | |||
409 | G-EDF, C-EDF ONLY for now! | ||
410 | |||
411 | |||
412 | config LITMUS_PAI_SOFTIRQD | ||
413 | bool "Defer tasklets to context switch points." | ||
414 | help | ||
415 | Only execute scheduled tasklet bottom halves at | ||
416 | scheduling points. Trades context switch overhead | ||
417 | at the cost of non-preemptive durations of bottom half | ||
418 | processing. | ||
419 | |||
420 | G-EDF, C-EDF ONLY for now! | ||
421 | |||
422 | endchoice | ||
423 | |||
424 | |||
425 | config LITMUS_NVIDIA | ||
426 | bool "Litmus handling of NVIDIA interrupts." | ||
427 | default n | ||
428 | help | ||
429 | Direct tasklets from NVIDIA devices to Litmus's klmirqd | ||
430 | or PAI interrupt handling routines. | ||
431 | |||
432 | If unsure, say No. | ||
433 | |||
434 | config LITMUS_AFFINITY_AWARE_GPU_ASSINGMENT | ||
435 | bool "Enable affinity-aware heuristics to improve GPU assignment." | ||
436 | depends on LITMUS_NVIDIA && LITMUS_AFFINITY_LOCKING | ||
437 | default n | ||
438 | help | ||
439 | Enable several heuristics to improve the assignment | ||
440 | of GPUs to real-time tasks to reduce the overheads | ||
441 | of memory migrations. | ||
442 | |||
443 | If unsure, say No. | ||
444 | |||
445 | config NV_DEVICE_NUM | ||
446 | int "Number of NVIDIA GPUs." | ||
447 | depends on LITMUS_SOFTIRQD || LITMUS_PAI_SOFTIRQD | ||
448 | range 1 16 | ||
449 | default "1" | ||
450 | help | ||
451 | Should be (<= to the number of CPUs) and | ||
452 | (<= to the number of GPUs) in your system. | ||
453 | |||
454 | choice | ||
455 | prompt "CUDA/Driver Version Support" | ||
456 | default CUDA_5_0 | ||
457 | depends on LITMUS_NVIDIA | ||
458 | help | ||
459 | Select the version of CUDA/driver to support. | ||
460 | |||
461 | config CUDA_5_0 | ||
462 | bool "CUDA 5.0" | ||
463 | depends on LITMUS_NVIDIA && REALTIME_AUX_TASKS | ||
464 | help | ||
465 | Support CUDA 5.0 RCx (dev. driver version: x86_64-304.33) | ||
466 | |||
467 | config CUDA_4_0 | ||
468 | bool "CUDA 4.0" | ||
469 | depends on LITMUS_NVIDIA | ||
470 | help | ||
471 | Support CUDA 4.0 RC2 (dev. driver version: x86_64-270.40) | ||
472 | |||
473 | config CUDA_3_2 | ||
474 | bool "CUDA 3.2" | ||
475 | depends on LITMUS_NVIDIA | ||
476 | help | ||
477 | Support CUDA 3.2 (dev. driver version: x86_64-260.24) | ||
478 | |||
479 | endchoice | ||
480 | |||
481 | config LITMUS_NV_KLMIRQD_DEBUG | ||
482 | bool "Raise fake sporadic tasklets to test nv klimirqd threads." | ||
483 | depends on LITMUS_NVIDIA && LITMUS_SOFTIRQD | ||
484 | default n | ||
485 | help | ||
486 | Causes tasklets to be sporadically dispatched to waiting klmirqd | ||
487 | threads. WARNING! Kernel panic may occur if you switch between | ||
488 | LITMUS plugins! | ||
489 | |||
490 | endmenu | ||
491 | |||
282 | endmenu | 492 | endmenu |