aboutsummaryrefslogtreecommitdiffstats
path: root/litmus/rt_domain.c
Commit message (Collapse)AuthorAge
* cleanup trailing whitespaceBjoern B. Brandenburg2009-09-10
|
* rt domain: remove unused debugging codeBjoern B. Brandenburg2009-05-04
|
* rt domain: fix rare deadlock between timer base lock and release lockBjoern B. Brandenburg2009-05-03
| | | | | | If a timer happens to go off at the wrong time on the wrong CPU, the old code could deadlock. This avoided in the new version by dropping the release_lock before using the hrtimer API.
* rt domain: make sure release heap is not in use before re-initBjoern B. Brandenburg2009-05-03
| | | | | | | | This fixes a bug observed under G-EDF: A task with extremely low wcet budget could get scheduled and re-added to its own release heap while the heap was still in use in the same timer callback that released the task. Havoc, predictably, ensued.
* rt domain: avoid use-after-free and re-init-while-in-use bugsBjoern B. Brandenburg2009-05-03
| | | | | | Don't just blindly overwrite the timers if they could be still in use. The the use-after-free bug was observed under Qemu.
* rt domain: don't arm the same release heap timer twice (bugfix)Bjoern B. Brandenburg2009-05-02
| | | | | If the timeout was realy close and the timing unfortunate, the timer callback got invoked twice, with oopsing consequences.
* fixup commit: missing rtdomain piecesBjoern B. Brandenburg2009-04-23
|
* rt domain: add support for release masterBjoern B. Brandenburg2009-04-22
| | | | | A release master is a CPU that takes all timer interrupts for release of a given rt_domain_t. By default off.
* rt_domain: use per-event timersBjoern B. Brandenburg2009-04-09
| | | | | | | | | | | | Don't multiplex one timer among all release heaps. The hrtimer subsystem can handle many timers and is heavily optimize; make use of this fact. This also greatly simplifies the actual callback, which should help to bring down release overheads. This also saves memory as we do not need to maintain a separate heap of (release) heaps.
* rt_domain: do not allocate/free memory in release queue handlingBjoern B. Brandenburg2009-04-09
| | | | | | | | | | | | This fixes a bunch of bugs: - a memory leak (some heap nodes were never reclaimed) - a locking rules violation (memory allocation can wake up kswapd, which causes a circular locking dependency between the release queue lock and the run queue locks Also, allocating memory in a hot path was never particularly clever. This patch pre-allocates memory at task-creation time, but does not change how the release queue works overall.
* rt_domain: don't deadlock in hrtimer_cancel()Bjoern B. Brandenburg2009-04-08
| | | | | | | | In the infrequent case that arm_release_timer() is called while the timer callback is executing on the same CPU (e.g., a timer tick occurred), then hrtimer_cancel() will get stuck in an infinite loop. This can be avoided by using hrtimer_try_to_cancel() instead.
* fixed sizeof usage to conform to linux kernel coding style. so,Mitchell Jareo2009-03-01
| | | | | | | | struct x* p = kmalloc(sizeof(struct x), ....) becomes struct x* p = kmalloc(sizeof(*p), ...) for example.
* sched_trace: new implementationBjoern B. Brandenburg2008-10-06
| | | | | This provides and hooks up a new made-from-scratch sched_trace() implementation based on Feather-Trace and ftdev.
* cleanup: fix some sloppiness spotted by JohnBjoern B. Brandenburg2008-09-11
| | | | | This patch fixes some minor issues that inadvertedly crept in during development. Found in John's review.
* rt_domain: make release queue handling more efficientBjoern B. Brandenburg2008-09-11
| | | | | | | | | | | | | | Instead of having hrtimers for each task, we now have only one hrtimer per rt_domain. To-be-released tasks are grouped in mergable heaps and presented as a bunch on each release. This approach should allow us to reduce the worst-case overhead at hyperperiod boundaries significantly. 1) less hrtimer overhead 2) less calls to the active plugin 3) only one CPU handles releases at a time 4) (2) & (3) should bring down lock contention significantly
* Add Feather-Trace support.Bjoern B. Brandenburg2008-05-22
| | | | | | | | - TICK - SCHED1 - SCHED2 - RELEASE - CXS
* Use binomial heaps as priority queues.Bjoern B. Brandenburg2008-05-19
| | | | | | The list-based priority queues did not perform well on the Niagara T2000. This heap-based implementation should perform much faster when queues are long.
* GSN/PSN: improve lockingBjoern B. Brandenburg2008-05-11
|
* initialize spin locks in rt_domain code properlyBjoern B. Brandenburg2008-05-10
| | | | | As discovered by John, the old way of initializing the spin locks breaks when rt_domains are allocated dynamically.
* LITMUS: don't let rt_domain deadlock in global pluginsBjoern B. Brandenburg2008-05-10
| | | | | | | | | | | | | | | | | | | | | | | | | | On the T2000, GSN-EDF would eventually deadlock. This was caused by a deadlock involving the release and ready locks of its rt_domain. Usually, the dependency in GSN-EDF is: function held -> required ========================================= enqueue: ready -> release gsnedf_job_release: -> ready arm_release_timer: -> release So far so good. The problem arose when hrtimer detected that the timer being armed had already expired (must have been just a few nanoseconds) and decided to call the callback directly WHILE HOLDING THE RELEASE LOCK. Which led to the following result: function held -> required CPU ==================================================== enqueue: ready -> release 5 gsnedf_job_release: release -> ready 6 We avoid this problem now by dropping the release lock in arm_release_timer() before calling the job release callback.
* LITMUS: provide more debug infoBjoern B. Brandenburg2008-05-03
| | | | Added one message and improved another.
* LITMUS: use no_rqlock_work to avoid ksoftirqd deadlockBjoern B. Brandenburg2008-05-02
| | | | | We can't use tasklets from within the scheduler. User no_rqlock_work instead.
* LITMUS: rework rt_domain to not cause circular lockig dependenciesBjoern B. Brandenburg2008-05-02
|
* LITMUS CORE: Release jobs with hrtimersJohn M. Calandrino2008-04-30
| | | | John's proposal for how to release jobs with hrtimers.
* LITMUS 2008: Initial PortBjoern B. Brandenburg2008-02-13
This introduces the core changes ported from LITMUS 2007. The kernel seems to work under QEMU, but many bugs probably remain.