aboutsummaryrefslogtreecommitdiffstats
path: root/include/litmus
Commit message (Collapse)AuthorAge
* COMMENT: Correct comment on precise budget enforcementGlenn Elliott2011-08-27
| | | | | Original comment said that this feature wasn't supported, though it has been since around October 2010.
* Avoid needlessly costly migrations. CONFIG_SCHED_CPU_AFFINITYGlenn Elliott2011-08-27
| | | | | | | | | | | | | Given a choice between several available CPUs (unlinked) on which to schedule a task, let the scheduler select the CPU closest to where that task was previously scheduled. Hopefully, this will reduce cache migration penalties. Notes: SCHED_CPU_AFFINITY is dependent upon x86 (only x86 is supported at this time). Also PFair/PD^2 does not make use of this feature. Signed-off-by: Andrea Bastoni <bastoni@cs.unc.edu>
* Improve FMLP queue management.wip-fmlp-dequeueGlenn Elliott2011-03-31
| | | | | | | | | | The next owner of a FMLP-protected resource is dequeued from the FMLP FIFO queue by unlock() (when the resource is freed by the previous owner) instead of performing the dequeue by the next owner immediately after it has been woken up. This simplifies the code a little bit and also reduces potential spinlock contention.
* Litmus core: add generic clustering supportBjoern B. Brandenburg2011-02-01
| | | | | Inspired by the existing C-EDF code, this generic version will build clusters of CPUs based on a given cache level.
* Litmus core: extract userspace interface from C-EDFBjoern B. Brandenburg2011-02-01
| | | | | Make the cluster size configuration in C-EDF generic so that it can be used by other clustered schedulers.
* Feather-Trace: rename locking trace pointsBjoern B. Brandenburg2011-02-01
| | | | | Since we don't expect to trace more than one lock type at a time, having protocol-specific trace points is not required.
* fdso: pass userpsace config argument to object constructorBjoern B. Brandenburg2011-02-01
| | | | | | | | | | | | As Glenn pointed out, it is useful for some protocols (e.g., k-exclusion protocols) to know the userspace configuration at object creation time. This patch changes the fdso API to pass the parameter to the object constructor, which is then in turn passed to the lock allocater. The return code from the lock allocater is passed to userspace in return. This also fixes some null pointer dereferences in the FDSO code found by the test suite in liblitmus.
* PSN-EDF: re-implement FMLP supportBjoern B. Brandenburg2011-02-01
| | | | | Implement the partitioned FMLP with priority boosting based on the generic lock API.
* EDF: support priority boostingBjoern B. Brandenburg2011-02-01
| | | | While we are at it, simplify edf_higher_prio() a bit.
* FMLP: remove old implementationBjoern B. Brandenburg2011-02-01
|
* SRP: port to new generic locking APIBjoern B. Brandenburg2011-02-01
| | | | | This re-enables SRP support under PSN-EDF and demonstrates how the new locking API should be used.
* Litmus core: replace FMLP & SRP system calls with generic syscallsBjoern B. Brandenburg2011-02-01
| | | | | This renders the FMLP and SRP unfunctional until they are ported to the new locking API.
* Litmus core: add generic locking APIBjoern B. Brandenburg2011-02-01
| | | | | Provide a unified userspace interface for plugin-specific locking protocols.
* Litmus core: change plugin locking interface to generic 'allocate_lock()'Bjoern B. Brandenburg2011-02-01
| | | | | | | | | As the number of supported locking protocols is expected to rise, hard-coding things like priority inheritance in the plugin interface doesn't scale. Instead, use a new generic lock-ops approach. With this approach, each plugin can define its own protocol implementation (or use a generic one), and plugins can support multiple protocols without having to change the plugin interface for each protocol.
* fdso: supply object type to constructor and destructor methodsBjoern B. Brandenburg2011-02-01
| | | | Passing the object type explicitly will enable generic lock constructors.
* Fixed is_hrt, is_srt, and is_be macros.Jonathan Herman2011-02-01
|
* Added task class to feather trace param record.Jonathan Herman2011-02-01
|
* Litmus core: add copy_and_chomp() helperBjoern B. Brandenburg2011-01-30
| | | | | | We read in a line from userspace and remove the trailing newline in a number of places. This function extracts the common code to avoid future duplication.
* Added support for tracing arbitrary actions.wip-eventsJonathan Herman2011-01-26
|
* Feather-Trace: dynamic memory allocation and clean exit2011.1Christopher Kenna2011-01-12
| | | | | | This patch changes Feather-Trace to allocate memory for the minor devices dynamically, which addresses a long-standing FIXME. It also provides clean module exit and error conditions for Feather-Trace.
* Feather-Trace: register devices with sysfsChristopher Kenna2011-01-12
| | | | | | | | | | This patch implements support for Feather-Trace devices to use the sysfs file system and, consequently, udev support. This allows us to allocate major/minor numbers for Feather-Trace devices dynamically, which is desirable because our old static allocations tend to create conflicts on modern distributions and/or when there are many cores.
* bugfix: avoid underflow in budget_remaining()Bjoern B. Brandenburg2010-11-29
| | | | | | | budget_remaining() reports incorrect values due to the operands being switched, which leads to an integer underflow. Reported-by: Chris Kenna <cjk@cs.unc.edu>
* add optional [function@file:line] tag to TRACE() logBjoern B. Brandenburg2010-11-22
| | | | | | | | | | | Add information to each trace message that makes it easier to locate where it came from. It is disabled by default since this adds a lot of clutter. Example: 81281 P1 [gsnedf_schedule@litmus/sched_gsn_edf.c:406]: (rtspin/1483:1) blocks:0 out_of_time:0 np:0 sleep:1 preempt:0 state:0 sig:0 81282 P1 [job_completion@litmus/sched_gsn_edf.c:303]: (rtspin/1483:1) job_completion(). 81283 P1 [__add_release@litmus/rt_domain.c:344]: (rtspin/1483:2) add_release(), rel=41941764351 81284 P1 [gsnedf_schedule@litmus/sched_gsn_edf.c:453]: (rtspin/1483:2) scheduled_on = NO_CPU
* log job number in TRACE_TASK() and TRACE_CUR()Bjoern B. Brandenburg2010-11-22
| | | | | | | | | | | | | | | | For some problems it can be helpful to know which job of a task generated a log message. This patch changes TRACE_TASK to add :<jobno> to the existing (<comm>/<pid>) tag. The result is a trace such as the following, in which the third job of rtspin/1511 completes and the fourth job is added to the release queue. 137615 P0: (rtspin/1511:3) job_completion(). 137616 P0: (rtspin/1511:4) add_release(), rel=262013223089 137617 P0: (rtspin/1511:4) scheduled_on = NO_CPU The job number for non-real-time tasks is always zero.
* Remove LITMUS^RT TRACE_BUG_ON macroBjoern B. Brandenburg2010-11-11
| | | | | | Linux now has a macro of the same name, which causes namespace collisions. Since our version is only being used in two places that haven't triggered in several years, let's just remove it.
* Implement proper remote preemption supportBjoern B. Brandenburg2010-11-11
| | | | | | | | | | | | To date, Litmus has just hooked into the smp_send_reschedule() IPI handler and marked tasks as having to reschedule to implement remote preemptions. This was never particularly clean, but so far we got away with it. However, changes in the underlying Linux, and peculartities of the ARM code (interrupts enabled before context switch) break this naive approach. This patch introduces new state-machine based remote preemption support. By examining the local state before calling set_tsk_need_resched(), we avoid confusing the underlying Linux scheduler. Further, this patch avoids sending unncessary IPIs.
* Split out TRACE() from litmus.h and cleanup some includesBjoern B. Brandenburg2010-11-11
| | | | | | | | | | The TRACE() functionality doesn't need all of litmus.h. Currently, it's impossible to use TRACE() in sched.h due to a circular dependency. This patch moves TRACE() and friends to litmus/sched_debug.h, which can be included in sched.h. While at it, also fix some minor include ugliness that was revealed by this change.
* C-EDF: move /proc/litmus/cluster_cache to /proc/litmus/plugins/C-EDF/clusterBjoern B. Brandenburg2010-11-11
| | | | | | | Make use of the new per-plugin proc file infrastructure to avoid littering the global namespace. While at it, also move all the relevant bits to sched_cedf.c. In the future, each plugin's parameters should be handled in the respective plugin file.
* Litmus core: refactor the implementation of /procChristopher Kenna2010-10-23
|
* Litmus core: per-plugin proc directoriesChristopher Kenna2010-10-23
| | | | | | Change the Litmus proc layout so that loaded plugins are visible in /proc/litmus/plugins/loaded and add Litmus functions make_plugin_proc_dir() and remove_plugin_proc_dir() to add per-plugin proc directories.
* Litmus core: add plugin-independent precise budget enforcement infrastructureBjoern B. Brandenburg2010-10-19
| | | | | | | Simple logic: if a task requires precise enforcement, then program a hr-timer to fire when the task must be descheduled. When the timer fires, simply activate the scheduler. When we switch to a different task, either reprogram the timer or cancel it.
* Litmus core: add macro to test for PRECISE_ENFORCEMENTBjoern B. Brandenburg2010-10-19
| | | | | | Required for EDF-WM. We should implement precise enforcement in the core distribution soon anyway (once we know how it works in EDF-WM).
* Litmus core: add budget_remaining() helperBjoern B. Brandenburg2010-10-19
| | | | Quick way to figure out how much budget a LITMUS^RT job has left.
* rt_domain_t: add add_release_on()Bjoern B. Brandenburg2010-10-18
| | | | | | | | This API addition allows the calling code to override the release master for a given rt_domain_t object. This is particularly useful if a job is supposed to migrate to a particular CPU. This need arises for example in semi- partitioned schedulers.
* 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
|