| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of tie-breaking by PID (which is a static
priority tie-break), we can tie-break by other
job-level-unique parameters. This is desirable
because tasks are equaly affected by tardiness
since static priority tie-breaks cause tasks
with greater PID values to experience the most
tardiness.
There are four tie-break methods:
1) Lateness. If two jobs, J_{1,i} and J_{2,j} of
tasks T_1 and T_2, respectively, have equal
deadlines, we favor the job of the task that
had the worst lateness for jobs J_{1,i-1} and
J_{2,j-1}.
Note: Unlike tardiness, lateness may be less than
zero. This occurs when a job finishes before its
deadline.
2) Normalized Lateness. The same as #1, except
lateness is first normalized by each task's
relative deadline. This prevents tasks with short
relative deadlines and small execution requirements
from always losing tie-breaks.
3) Hash. The job tuple (PID, Job#) is used to
generate a hash. Hash values are then compared.
A job has ~50% chance of winning a tie-break
with respect to another job.
Note: Emperical testing shows that some jobs
can have +/- ~1.5% advantage in tie-breaks.
Linux's built-in hash function is not totally
a uniform hash.
4) PIDs. PID-based tie-break used in prior
versions of Litmus.
Conflicts:
litmus/edf_common.c
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added support for arbitrary deadlines.
Constraint: Relative deadline must be >= exec cost.
Use: Set relative deadline in rt_task::rdeadline. Set value to 0
to default to implicit deadlines.
Limitations: PFAIR not supported by this patch. PFAIR updated to
reject tasks that do not have implicit deadlines.
|
|
|
|
|
|
| |
Add a comment to explain how priorities are
interpreted, and provide some useful macros for
userspace.
|
|
|
|
| |
Prior to that it was only used internally for DPCP
|
|
|
|
|
|
|
|
|
|
| |
dissertation (branch bbb-diss) to current
version of litmus
This is needed for ongoing projects
I took the unchanged code but removed some leftovers
of OMLP which is not implemented
|
|
|
|
|
|
|
|
|
|
| |
This patch changes how preemptions of jobs without
budget work. Instead of requeuing them, they are now
only added if they are not subject to budget enforcement
or if they have non-zero budget. This allows us to process
job completions that race with preemptions.
This appears to fix a BUG in budget.c:65 reported by Giovani Gracioli.
|
|
|
|
|
|
|
|
|
| |
litmus.h is accumulating too many things. Since
we already have budget.h, let's stick all budget-related
inline functions there as well.
This patch is merely cosmetic; it does not change
how budget enforcement works.
|
|
|
|
|
|
|
| |
An efficient binary heap implementation coded in the
style of Linux's list. This binary heap should be able
to replace any partially sorted priority queue based
upon Linux's list.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enable kernel-style events (tracepoint) for Litmus. Litmus events
trace the same functions as the sched_trace_XXX(), but can be
enabled independently.
So, why another tracing infrastructure then:
- Litmus tracepoints can be recorded and analyzed together (single
time reference) with all other kernel tracing events (e.g.,
sched:sched_switch, etc.). It's easier to correlate the effects
of kernel events on litmus tasks.
- It enables a quick way to visualize and process schedule traces
using trace-cmd utility and kernelshark visualizer.
Kernelshark lacks unit-trace's schedule-correctness checks, but
it enables a fast view of schedule traces and it has several
filtering options (for all kernel events, not only Litmus').
|
| |
|
|
|
|
|
|
|
| |
Increment a processor-local counter whenever an interrupt is handled.
This allows Feather-Trace to include a (truncated) counter and a flag
to report interference from interrupts. This could be used to filter
samples that were disturbed by interrupts.
|
|
|
|
|
|
| |
User a 32-bit word for all non-preemptive section flags.
Set the "please yield soon" flag atomically when
accessing it on remotely-scheduled tasks.
|
|
|
|
|
| |
This allows us to splice in information into logs from events
that were recorded in userspace.
|
| |
|
| |
|
|
|
|
|
|
| |
Preemption state tracing is only useful when debugging preemption-
and IPI-related races. Since it creates a lot of clutter in the logs,
this patch turns it off unless explicitly requested.
|
|
|
|
|
|
|
|
|
|
| |
Needed to update C-EDF to handle release master. Also
updated get_nearest_available_cpu() to take NO_CPU instead
of -1 to indicate that there is no release master. While
NO_CPU is 0xffffffff (-1 in two's complement), we still
translate this value to -1 in case NO_CPU changes.
Signed-off-by: Andrea Bastoni <bastoni@cs.unc.edu>
|
|
|
|
|
| |
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.
|