aboutsummaryrefslogtreecommitdiffstats
path: root/include/litmus
Commit message (Collapse)AuthorAge
* Implement the pi semaphore stack.Glenn Elliott2010-08-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch continues the work to implement a generic pi framework. Under this framework, each task_struct maintains a stack of held locks, in the order they are acquired. This stack is mainly used to determine the proper inheritance when a lock is released. On release, the releasing job iterates through its semaphore stack to determine if it blocks a higher priority job and inherits the proper priority as needed. The stack is needed since a blocked job cannot push this information to the lock holder because the inheritance may not take place immediately when the job is blocked. Stack operations include push, pop, update, and peek. The semaphore stack is really only useful to protocols that support traditional nesting. Protocols that do not use traditional nesting, such as FMLP-Long, do not need a stack to track inheritance. So, struct rt_param now also has a task_struct pointer, eff_priority. eff_priority is used in almost the same way was rt_param.inh_task was used in the original FMLP implementation. The slight difference is that eff_priority is set to equal to self when a job acquires a semaphore with no inheritance. This is stylistically similar to FMLP using a semaphore stack. Note that FMLP-Long completely forgoes the use of semaphore stack and only uses eff_priority. Finally, it is intended that eff_priority also be used with nested protocols. A job using a nested protocol would set eff_priority equal to the highest priority received from all held locks. Thus, eff_priority caches the priority a job inherits (the semaphore stack does not need to be iterated through each time the job's priority is required).
* Restructure pi_semaphore struct for generic inheritance framework.Glenn Elliott2010-08-03
| | | | | | | | | | | | | | First patch in a series to implement a generic priority inheritance framework that can be used by semaphores that use priority inheritance. This patch makes pi_semaphore a 'base class' for pi-protocols. pi_semaphore is updated to include a pi_sem_record field named stack_node. This stack_node is a linked-list node that a task holding the pi_semaphore instance adds to their semaphore stack. Note that the task's semaphore stack (or linked-list) simply chains stack_node's of held semaphores into a single linked-list. This is safe since there is only one semaphore holder at any given moment. Finally, FMLP-specific data members out to child class fmlp_semaphore.
* Make platform-specific Feather-Trace depend on !CONFIG_DEBUG_RODATABjoern B. Brandenburg2010-06-01
| | | | | | | | | | | Feather-Trace rewrites instructions in the kernel's .text segment. This segment may be write-protected if CONFIG_DEBUG_RODATA is selected. In this case, fall back to the default flag-based Feather-Trace implementation. In the future, we could either adopt the ftrace method of rewriting .text addresses using non-.text mappings or we could consider replacing Feather-Trace with ftrace altogether. For now, this patch avoids unexpected runtime errors.
* Make release master support optionalBjoern B. Brandenburg2010-06-01
| | | | | | | | Introduces CONFIG_RELEASE_MASTER and makes release master support dependent on the new symbol. This is useful because dedicated interrupt handling only applies to "large" multicore platforms. This will allow us to not implement smp_send_pull_timers() for all platforms.
* Make __ARCH_HAS_FEATHER_TRACE a proper CONFIG_ variable.Bjoern B. Brandenburg2010-05-30
| | | | | | | | | The idea of the Feather-Trace default implementation is that LITMUS^RT should work without a specialized Feather-Trace implementation present. This was actually broken. Changes litmus/feather_trace.h to only include asm/feather_trace.h if actually promised by the architecture.
* Added support for choices in budget policy enforcement.Glenn Elliott2010-05-30
| | | | | | | | | | NO_ENFORCEMENT - A job may execute beyond its declared execution time. Jobs notify the kernel that they are complete via liblitmus's sleep_next_period() QUANTUM_ENFORCEMENT - The kernel terminates a job if its actual execution time exceeds the declared execution time. PRECISE_ENFORCEMENT - Hook declared, but not yet implemented. Plan to support this policy through hrtimers. Error thrown if specified.
* Change most LitmusRT spinlock_t in raw_spinlock_tAndrea Bastoni2010-05-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adapt to new schema for spinlock: (tglx 20091217) spinlock - the weakest one, which might sleep in RT raw_spinlock - spinlock which always spins even on RT arch_spinlock - the hardware level architecture dependent implementation ---- Most probably, all the spinlocks changed by this commit will be true spinning lock (raw_spinlock) in PreemptRT (so hopefully we'll need few changes when porting Litmmus to PreemptRT). There are a couple of spinlock that the kernel still defines as spinlock_t (therefore no changes reported in this commit) that might cause us troubles: - wait_queue_t lock is defined as spinlock_t; it is used in: * fmlp.c -- sem->wait.lock * sync.c -- ts_release.wait.lock - rwlock_t used in fifo implementation in sched_trace.c * this need probably to be changed to something always spinning in RT at the expense of increased locking time. ---- This commit also fixes warnings and errors due to the need to include slab.h when using kmalloc() and friends. ---- This commit does not compile.
* Add C-EDF Plugin2010.1Andrea Bastoni2010-05-29
| | | | | | Improved C-EDF plugin. C-EDF now supports different cluster sizes (based on L2 and L3 cache sharing) and supports dynamic changes of cluster size (this requires reloading the plugin).
* Bugfix: 1) incorrect FMLP high prio task tracking and 2) race in print statementGlenn Elliott2010-05-29
| | | | | | | | 1) High priority task tied to FMLP semaphore in P-EDF scheduling is incorrectly tracked for tasks acquiring the lock without contention. (HP is always set to CPU 0 instead of proper CPU.) 2) Race in a print statement from P-EDF's pi_block() causes NULL pointer dereference.
* Introduce generic NP-section aware preemption functionBjoern B. Brandenburg2010-05-29
| | | | | | | | Dealing with preemptions across CPUs in the presence of non-preemptive sections can be tricky and should not be replicated across (event-driven) plugins. This patch introduces a generic preemption function that handles non-preemptive sections (hopefully) correctly.
* Re-implement non-preemptive section support.Bjoern B. Brandenburg2010-05-29
| | | | | | | | | | | | Re-introduce NP sections in the configuration and in litmus.h. Remove the old np_flag from rt_param. If CONFIG_NP_SECTION is disabled, then all non-preemptive section checks are constant expressions which should get removed by the dead code elimination during optimization. Instead of re-implementing sys_exit_np(), we simply repurposed sched_yield() for calling into the scheduler to trigger delayed preemptions.
* Add virtual LITMUS^RT control device.Bjoern B. Brandenburg2010-05-29
| | | | | | | | | This device only supports mmap()'ing a single page. This page is shared RW between the kernel and userspace. It is inteded to allow near-zero-overhead communication between the kernel and userspace. It's first use will be a proper implementation of user-signaled non-preemptable section support.
* Add Feather-Trace x86_64 architecture dependent codeAndrea Bastoni2010-05-29
|
* [ported from 2008.3] Add Feather-Trace x86_32 architecture dependent codeAndrea Bastoni2010-05-29
| | | | | - [ported from 2008.3] Add x86_32 architecture dependent code. - Add the infrastructure for x86_32 - x86_64 integration.
* Add support for x86_64 architectureAndrea Bastoni2010-05-29
| | | | | | | - Add syscall on x86_64 - Refactor __NR_sleep_next_period -> __NR_complete_job for both x86_32 and x86_64
* Refactor binomial heap names: heap -> bheapAndrea Bastoni2010-05-29
| | | | | | - Binomial heap "heap" names conflicted with priority heap of cgroup in kernel - This patch change binomial heap "heap" names in "bheap"
* [ported from 2008.3] Add release-master supportAndrea Bastoni2010-05-29
|
* [ported from 2008.3] Add LITRMUS^RT syscalls to x86_32Andrea Bastoni2010-05-29
|
* [ported from 2008.3] Add File Descriptor Attached Shared Objects (FDSO) ↵Andrea Bastoni2010-05-29
| | | | infrastructure
* [ported from 2008.3] Add common EDF functionsAndrea Bastoni2010-05-29
|
* [ported from 2008.3] Add rt_domain_t supportAndrea Bastoni2010-05-29
| | | | | Still to be merged: - arm_release_timer() with no rq locking
* [ported from 2008.3] Add tracing support and hook up Litmus KConfig for x86Andrea Bastoni2010-05-29
| | | | | | | | - fix requesting more than 2^11 pages (MAX_ORDER) to system allocator Still to be merged: - feather-trace generic implementation
* [ported from 2008.3] Add Feather-Trace device file supportAndrea Bastoni2010-05-29
|
* [ported from 2008.3] Core LITMUS^RT infrastructureAndrea Bastoni2010-05-29
Port 2008.3 Core LITMUS^RT infrastructure to Linux 2.6.32 litmus_sched_class implements 4 new methods: - prio_changed: void - switched_to: void - get_rr_interval: return infinity (i.e., 0) - select_task_rq: return current cpu