aboutsummaryrefslogtreecommitdiffstats
path: root/litmus
Commit message (Collapse)AuthorAge
* NULL affinity dereference in C-EDF.wip-migration-affinityGlenn Elliott2011-04-26
| | | | | C-EDF needs to check to see if affinity is not NULL before checking if affinity-selected CPU is in current cluster.
* Not detecting L3 cache level since L1 has two levels.Glenn Elliott2011-04-26
|
* Avoid needlessly costly migrations. CONFIG_SCHED_CPU_AFFINITYGlenn Elliott2011-04-26
| | | | | | | | | | 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. TODO: If a lower-priority task must be preempted and there are several scheduled tasks with the same low priority, then preempt the closest.
* LITMUS Core: Check for valid class in RT-param syscall.Christopher Kenna2011-04-20
|
* bugfix: release master CPU must signal task was pickedBjoern B. Brandenburg2011-04-12
| | | | | Otherwise, the release master CPU may try to reschedule in an infinite loop.
* 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.
* Pfair: remove sporadic_release flagBjoern B. Brandenburg2011-02-01
| | | | | Instead of having an extra flag, Pfair should just infer sporadic release based on deadlines like other plugins, too.
* Pfair: support clustered schedulingBjoern B. Brandenburg2011-02-01
| | | | | | | Just like C-EDF is a global scheduler that is split across several clusters, Pfair can be applied on a per-cluster basis. This patch changes the Pfair implementation to enable clustering based on the recently added generic clustering support.
* 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.
* GSN-EDF: re-implement FMLP supportBjoern B. Brandenburg2011-02-01
| | | | This introduces the global FMLP based on the generic locking layer.
* 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.
* Added task class to feather trace param record.Jonathan Herman2011-02-01
|
* bugfix: don't let children stay Litmus real-time tasksBjoern B. Brandenburg2011-01-30
| | | | | | | | It has always been LITMUS^RT policy that children of real-time tasks may not skip the admissions test, etc. This used to be enforced, but was apparently dropped during some port. This commit re-introduces this policy. This fixes a kernel panic that occurred when "real-time children" exited without proper initilization.
* 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.
* cleanup C-EDF cluster size configurationBjoern B. Brandenburg2011-01-05
| | | | | | | Refactor the code that determines the C-EDF cluster size. - Use an enum with symbolic constants instead of magic int values. - Complain and fail to switch if an unsupported cluster size is requested. - Default to ALL as suggested by Glenn and Andrea.
* bugfix: clear scheduled field of the correct CPU upon task_exit in C-EDFAndrea Bastoni2011-01-03
| | | | | | | | | Do not use the "scheduled_on" field to address the cpus structure within a cluster. cpus may contain less items than num_online_cpus and we may cause an out-of-bound access. Instead, use "scheduled_on" to directly access the per-cpu cpu_entry_t structure. Reported-by: Jonathan Herman <hermanjl@cs.unc.edu>
* bugfix: fix out-of-bound array access in cedf_activate_plugin()Andrea Bastoni2010-11-29
| | | | | | | Make sure to check for maximum index value when accessing cedf_domain_t array in cedf_activate_plugin(). Reported-by: Jeremy Erickson <jerickso@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
* Bugfix: synchronize with all other CPUs before switching pluginAndrea Bastoni2010-11-20
| | | | | | | | | | | The CPU triggering the plugin switch should wait until all other CPUs are in a proper state (synch_on_plugin_switch()) before performing the actual switch. Based on the original patch from Jeremy Erickson <jerickso@cs.unc.edu>. This should solve (for most practical cases) the C-EDF-related plugin-switch problem reported on the ML.
* Improve help message for TRACE() bufferBjoern B. Brandenburg2010-11-16
| | | | | It's not being allocated per cpu anymore. Further, provide a hint to the user where to find the data in userspace.
* Make TRACE() buffer size configurableBjoern B. Brandenburg2010-11-16
| | | | | | | | | | | Let the user choose an appropriate buffer size (instead of scaling with NR_CPUS). The kfifo api requires the buffer to be a power of two, so enforce this constraint in the configuration. This fixes a previously-existing compile-time error for values of NR_CPU that are not a power of two. Based on a patch by Mac Mollison <mollison@cs.unc.edu>.
* 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.
* Avoid warning on 64bit buildsBjoern B. Brandenburg2010-11-11
| | | | | The specifier %u doesn't match sizeof() if sizeof() returns a 64bit quantity on x86_64. Always cast it to int to avoid the warning.
* Cleanup TRACE() implementationBjoern B. Brandenburg2010-11-11
| | | | | | | | | | | | | | Since the intial rebased from .24 to .32, the TRACE() implementation was a hybrid between our old ringbuffer implementation and the new generic kfifo API. This was a) ugly and b) not save for TRACE() invoctations during early boot. This patch rips out the old parts and replaces the actual buffer with a static kfifo. This also increases TRACE() buffer size considerably. As we avoid a dynamic allocation, this a larger size is less problematic for debug builds. This helps a bit with holes in the debug log if the buffer-flushing task is starved.
* 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.
* sched_trace: make buffer size configurableBjoern B. Brandenburg2010-11-11
| | | | | Large sched_trace buffers cause boot problems on the ARM box. Allow the user to specify smaller buffers.
* 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.
* Merge commit 'v2.6.36' into wip-merge-2.6.36Andrea Bastoni2010-10-23
| | | | | | | | | | | | | | | | | | | | | | | Conflicts: Makefile arch/x86/include/asm/unistd_32.h arch/x86/kernel/syscall_table_32.S kernel/sched.c kernel/time/tick-sched.c Relevant API and functions changes (solved in this commit): - (API) .enqueue_task() (enqueue_task_litmus), dequeue_task() (dequeue_task_litmus), [litmus/sched_litmus.c] - (API) .select_task_rq() (select_task_rq_litmus) [litmus/sched_litmus.c] - (API) sysrq_dump_trace_buffer() and sysrq_handle_kill_rt_tasks() [litmus/sched_trace.c] - struct kfifo internal buffer name changed (buffer -> buf) [litmus/sched_trace.c] - add_wait_queue_exclusive_locked -> __add_wait_queue_tail_exclusive [litmus/fmlp.c] - syscall numbers for both x86_32 and x86_64
* Litmus core: allow PRECISE_ENFORCEMENT2010.2Bjoern B. Brandenburg2010-10-19
| | | | | Allow all kinds of budget enforcement settings now that we have the supporting infrastructure.
* Litmus core: enable precise budget enforcementBjoern B. Brandenburg2010-10-19
| | | | Update the budget enforcement timer after each scheduling decision.
* 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: set state to TASK_RUNNING before calling wake_up()Bjoern B. Brandenburg2010-10-19
| | | | | | | | | Having tasks that are !is_running() in shared structures is very confusing during development and debugging, and can likely mask bugs and/or create races. It seems like a strange choice that Linux changes a task's state only _after_ activating it. For LITMUS^RT tasks, we change this order.
* rt_domain_t: disable timer TRACE() spam by defaultBjoern B. Brandenburg2010-10-19
| | | | | | | These messages are highly useful when debugging races, but they quickly litter the log when looking for something else. We keep them around, but by default they shouldn't show up.
* 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.