| Commit message (Collapse) | Author | Age |
|
|
|
|
| |
Original comment said that this feature wasn't supported,
though it has been since around October 2010.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Inspired by the existing C-EDF code, this generic version will build
clusters of CPUs based on a given cache level.
|
|
|
|
|
| |
Make the cluster size configuration in C-EDF generic so that it can be
used by other clustered schedulers.
|
|
|
|
|
| |
Since we don't expect to trace more than one lock type at a time,
having protocol-specific trace points is not required.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Implement the partitioned FMLP with priority boosting based on the
generic lock API.
|
|
|
|
| |
While we are at it, simplify edf_higher_prio() a bit.
|
| |
|
|
|
|
|
| |
This re-enables SRP support under PSN-EDF and demonstrates how the new
locking API should be used.
|
|
|
|
|
| |
This renders the FMLP and SRP unfunctional until they are ported to
the new locking API.
|
|
|
|
|
| |
Provide a unified userspace interface for plugin-specific locking
protocols.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Passing the object type explicitly will enable generic lock constructors.
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Required for EDF-WM. We should implement precise enforcement
in the core distribution soon anyway (once we know how it
works in EDF-WM).
|
|
|
|
| |
Quick way to figure out how much budget a LITMUS^RT job has left.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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-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.
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
- [ported from 2008.3] Add x86_32 architecture dependent code.
- Add the infrastructure for x86_32 - x86_64 integration.
|
|
|
|
|
|
|
| |
- Add syscall on x86_64
- Refactor __NR_sleep_next_period -> __NR_complete_job
for both x86_32 and x86_64
|
|
|
|
|
|
| |
- Binomial heap "heap" names conflicted with priority heap
of cgroup in kernel
- This patch change binomial heap "heap" names in "bheap"
|
| |
|
| |
|