| Commit message (Collapse) | Author | Age |
|
|
|
| |
(BB: edited to include <litmus/litmus.h> to resolve compile error.)
|
|
|
|
|
|
|
|
|
|
| |
This patch makes CONFIG_PREEMPT_STATE_TRACE depend on
CONFIG_DEBUG_KERNEL. Prior to this patch, selecting PREEMPT_STATE_TRACE
resulted in linker errors (see below), because sched_state_name is not
built unless DEBUG_KERNEL is selected.
kernel/built-in.o: In function `schedule':
(.sched.text+0x3d2): undefined reference to `sched_state_name'
|
|
|
|
|
|
|
|
| |
This patch causes reboot notifications to be send
to Litmus. With this patch, Litmus attempts to
switch back to the Linux-plugin before the reboot
proceeds. Any failures to switch back are reported
via printk() (the reboot is not halted).
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch removes the RT_F_EXIT_SEM flag. All code paths
depending on it being true are assumed to be unreachable
and removed.
The 'flags' field in struct rt_params is left as-is for
use by specific schedulers. For example, sched_pfair
defines a custom flag RT_F_REQUEUE within the 'flags'
field.
Signed-off-by: Manohar Vanga <mvanga@mpi-sws.org>
|
|
|
|
| |
Signed-off-by: Manohar Vanga <mvanga@mpi-sws.org>
|
|
|
|
|
|
|
|
| |
This patch removes the flags RT_F_SLEEP and RT_F_RUNNING
as their name is misleading. This patch replaces them with
a 'completed' field in struct rt_param.
Signed-off-by: Manohar Vanga <mvanga@mpi-sws.org>
|
|
|
|
|
|
|
| |
This patch fixes a warning about an unused label in sched_pfp.c
when CONFIG_LITMUS_LOCKING is not set.
Signed-off-by: Manohar Vanga <mvanga@mpi-sws.org>
|
|
|
|
|
|
|
|
| |
This patch fixes the compiler warning about struct litmus_locking
being defined in the parameter list when CONFIG_LITMUS_LOCKING is
not set.
Signed-off-by: Manohar Vanga <mvanga@mpi-sws.org>
|
|
|
|
| |
No suspended task should ever be queued in this plugin.
|
|
|
|
|
| |
Crash and burn if an expected preemption didn't happen. This is useful
to flag any bugs in the queue management code...
|
|
|
|
| |
It's CONFIG_LITMUS_LOCKING, not just CONFIG_LOCKING...
|
|
|
|
| |
Stop hard-to-detect out-of-bounds errors early.
|
|
|
|
|
|
| |
Make the priority comparison easier to read. Also, remove the "equal
PID" clause and insert a corresponding BUG_ON() instead; this should
really never happen.
|
|
|
|
|
|
| |
boost_priority() is only applied to already-scheduled tasks. Remove
the (untested and unneeded) case handling unscheduled tasks, which was
likely not correct anyway.
|
|
|
|
|
| |
When a job was tardy, the plugin failed to invoke sched_trace. This
caused ugly "holes" in the visualized schedule.
|
|
|
|
|
|
|
| |
The SEND_RESCHED is really only interesting if the IPI was generated
by LITMUS^RT. Therefore, we don't need to trace in Linux's
architecture-specific code. Instead, we hook into the preemption state
machine, which is informed about incoming IPIs anyway.
|
|
|
|
|
|
|
|
|
|
| |
Linux's post_schedule() scheduling class hook more closely matches
what SCHED2 is supposed to trace, namely any scheduling overhead after
the context switch. The prior trace points caught timers being armed
from finish_switch(), which is already included in the context switch
cost CXS.
(This patch essentially reverts 8fe2fb8bb1c1cd0194608bc783d0ce7029e8d869).
|
|
|
|
|
|
|
| |
SEND_RESCHED_END is necessarily preceded by an interrupt. We don't
want to filter events based on this expected interrupts, but we still
want to detect samples disturbed by other interrupts. Hence, subtract
one off the interrupt count.
|
|
|
|
|
|
|
|
|
| |
IPIs have some special cases where irq_enter() is not called. This
caused ft_irq_fired() to "miss" some rescheduling-related interrupts,
which in turn may cause outliers.
This patch makes sure ft_irq_fired() is called on scheduling-related
IPIs.
|
|
|
|
|
| |
We don't want outliers due to soft IRQs, so let them mark ongoing
traces as "dirty" as well.
|
|
|
|
|
|
|
|
|
|
|
| |
If the tracing code is interrupted / preempted inbetween the time that
a sequence number is drawn and the time that the trace recorded is
allocated, then the trace file will contain "out of order" events.
These are difficult to detect during post-processing and can create
artificial "outliers". This patch briefly disables local interrutps to
avoid this.
While at it, de-duplicate the timestamp recording code.
|
|
|
|
|
|
| |
To detect interrupts that interfered after the initial time stamp was
recorded, this patch changes sched_trace to also record the IRQ count
as observed by userspace.
|
|
|
|
| |
Also add some compile-time checks to detect unexpected offsets.
|
|
|
|
|
| |
Support recording timestamps that allow tracing the entry and exit
costs of locking-related system calls.
|
|
|
|
|
| |
Reassing locking timestamps and prepare support for tracing
system call overheads.
|
|
|
|
|
|
|
|
| |
To properly trace locking overheads, it is required to tell apart
samples from different tasks, which requires keeping track of their
PIDs.
The timestamp is shortened to 48 bits to make room for the PID.
|
|
|
|
| |
Holding the lock prevents other tasks from opening the device.
|
|
|
|
|
|
|
| |
When a task exists and its FDSO table is released, the locking
protocol's 'close()' callback should be invoked to do proper
protocol-specific cleanup (such as unlocking the resource, if
required).
|
|
|
|
|
|
| |
The LITMUS^RT-specific completion API complete_n() is no longer
required by the synchronous release code. Let's remove it; one less
modification of a core Linux file to maintain during rebasing.
|
|
|
|
|
|
|
|
|
| |
The old implementation had the problem that the first job release of all
tasks was handled on the *same* CPU (that triggered the synchronous task set
release). This could result in significant latency spikes.
The new implementation uses a completion per task. Futher, each task programs
its own release, which ensures that it will be on the proper processor.
|
| |
|
|
|
|
|
|
| |
Commit e6f51fb826ce98d436f445aae4eb9e9dba1f30e8 added some floating
point support for LITMUS^RT, but it used 64-bit division that ARM does
not support. Therefore, use the division functions from math64.h.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Restructured the EDF task comparison code to improve readability.
Recoded chained logical expression embedded in return statement
into a series of if/else blocks.
|
|
|
|
|
|
|
|
|
| |
Fixes a bug in Litmus where processor scheduling states
could become corrupted. Corruption can occur when a
just-forked thread is externally forced to be scheduled
by SCHED_LITMUS before this just-forked thread can complete
post-fork processing. Specifically, before schedule_tail()
has completed.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Due to some mistake in the past, PSN-EDF was missing a check for
preemptions when a task resumes. P-FP adopted it by virtue of
copy&paste. This patch makes sure that a preemption is triggered when
a higher-priority task is added to the ready queue.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
By default, even private writable pages are mapped
with the RW bit disabled in the PTE. This causes a
"minor" page fault when the page is first written
to. To avoid this, make sure that vm_inert_page()
uses the proper page protection bits and mark the
VMA as VM_IO to keep the rest of the VM code out.
|
|
|
|
|
| |
Page faults should not happen here. Scream if they do anyway. This is
useful when extending the control page.
|
|
|
|
|
|
| |
vm_insert_page() is the simpler and preferred interface for remapping
individual pages and includes additional error checks. It suffices for
our purposes, so let's use it instead.
|
|
|
|
|
|
| |
The existing admission test failed to test for too-low
priorities. Use the common macro to accept only valid
priorities.
|
|
|
|
|
|
| |
Add a comment to explain how priorities are
interpreted, and provide some useful macros for
userspace.
|
|
|
|
|
| |
Move declaration of 'cpu' out of #ifdef block, it's also needed for
CONFIG_LITMUS_LOCKING.
|
|
|
|
| |
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 imports recent upstream changes in Feather-Trace that reduce
register pressure around Feather-Trace triggers.
References: Commits 00713b8 and 225d734 in Feather-Trace.
https://github.com/brandenburg/feather-trace/commit/00713b878636867ce07291c588509b38fa5bf152
https://github.com/brandenburg/feather-trace/commit/225d7348a08682cd87f72b127142bdfd6c0c7890
|
|
|
|
|
|
| |
This patch replicates the fix in commit
f141d730e91283a9bb5cfcb134fcead55d5da0c6
(which applies to GSN-EDF).
|
|
|
|
|
|
|
|
|
|
| |
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.
|