| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
|
| |
When budgets are not enforced and is exhausted, gedf_task_replenish_budget
will not actually call prepare_for_next_period, which means it will always
be in a state of budget exhaustion, therefore never being dispatched by
the reservation.
|
| |
|
| |
|
| |
|
|
|
|
| |
Added support for non-preemptivity in EXT-RES.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
When multiple scheduling events occur simultaneously, a situation could
happen where:
- one core schedules a task that is linked to it
- a check_for_preemption occurs due to another scheduling event
- that task is now linked to another core
- the other core tries to schedule it but can't grab the task from the
runqueue of the other core
Solution:
Added in the scheduled_on field in gedf_reservation. This enables us in
link_task_to_cpu to check for this occuring and swap the linking so the
above situation doesn't happen. The code is taken and modified from
link_task_to_cpu in GSN-EDF
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
When using litmus's budget enforcement, due various overheads, the
task's budget and the gedf_res's budget may differ a bit. When the task
overruns its budget but due to this difference still has budget
according to gedf_res, this can cause litmus to bug out due to error
checking in litmus's budget enforcement code.
Solution:
Made sure not to dispatch the task if it's out of budget in
gedf_task_dispatch_client
|
|
|
|
|
|
|
|
| |
Added a system call for the lock holder to check if it is
in a forbidden zone and if so, suspend until the beginning
of the next time slice for its parent component.
This does not include any "skipping ahead" mechanism.
|
| |
|
|
|
|
|
| |
This includes priority inheritance, but no concept of
forbidden zones.
|
|
|
|
|
| |
Reduces the size of our diff from upstream litmus and
should have no impact on functionality. Ported from MC^2.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Unlink in gedf_reservation would try to unlink a task that's not linked
nor in the ready queue. It is in fact in the release queue. This happens
when multiple check_for_preemptions occur simultaneously, and causes a
task to be "scheduled" on 2 cpu_entries simultaneously while out of
budget. Thus, both cpus in update_time replenishes the budget and tries
to unlink it. The first one succeeds, while the second fails.
For more details on how this occurs, see the comment in update_time in
gedf_reservation.c
|
|
|
|
|
| |
Now set to ULLONG_MAX - deadline(absolute). This fixes logic issues in
using higher_res_prio when one parameter is null
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Dynamic CPU entry/exit changes:
- Fix build with CONFIG_RELEASE_MASTER
- Migrate gedf_env release timer when a core is suspended
- Fix race condition in gedf_env core resume
- Add documentation
- Allow for gedf_env_suspend() and gedf_env_resume() to be called
on CPUs that have already been suspended or resumed. (They do
nothing in those cases.)
Portability:
- Allocate space in `gedf_reservation_environment` using
`num_online_cpus()` rather than `NR_CPUS`. Otherwise the stack
frame can overflow when `NR_CPUS` is large.
- Assign `plugin_state` from the plugin rather than the extended
reservations code to support other uses of `plugin_state`.
Misc:
- Improve robustnesss of `gedf_env_is_np()`
- Don't memset with 0 memory already zeroed-out by `kzalloc()`
- Use GFP_ATOMIC for allocations when in a scheduling context
|
|
|
|
|
|
|
|
|
|
| |
Bugs fixed:
- cpu priority comparison in gedf environment made it so cpus were
ordered opposite to what they are supposed to
- shutdown of component did not free all memory
Note: It is up to the table maker such that components do not cause
cross migrations of tasks
|
|
|
|
|
|
|
|
|
|
| |
Fixed the following:
-reservations(both mtd and gedf) were not properly added to the all_reservations list that
allows it to be found by find_res_by_id
-mtd_reservations not linked after it has been allocated
-fixed mtd_env_dispatch logic so that when nothing is in ready_queue, it
scheduled NULL instead of currently scheduled reservation
-fixed find_res_by_id forgetting to release lock
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Also, includes WIP of component allocator. This WIP is not included in
the makefile so it won't mess up the compilation.
|
|
|
|
|
|
|
|
|
|
|
| |
Changed gedf_reservation_environment suspend and resume logic to better support
a cleverer way of handling mapping real cpu to environment cpu_entries.
This removes the cpu_mapping variable which forces a multi-core component to
update cpu_mapping on one core(the first one to call schedule).
The new logic decentralizes this process, and allows a component to be
scheduled on a completely new set of cores in 1 scheduling pass.
|
| |
|
|
|
|
|
| |
Encounters problem where task waits an extra period due to
sleep(unresolved)
|
|
|
|
| |
Works under preliminary tests
|
| |
|
| |
|
|
This patch adds the core of LITMUS^RT:
- library functionality (heaps, rt_domain, prioritization, etc.)
- budget enforcement logic
- job management
- system call backends
- virtual devices (control page, etc.)
- scheduler plugin API (and dummy plugin)
This code compiles, but is not yet integrated with the rest of Linux.
Squashed changes:
LITMUS^RT Core: add get_current_budget() system call
Allow userspace to figure out the used-up and remaining budget
of a task.
Adds deadline field to control page and updates it when setting up jobs for release.
Adds control page deadline offset
ftdev: respect O_NONBLOCK flag in ftdev_read()
Don't block if userspace wants to go on doing something else.
Export job release time and job sequence number in ctrl page
Add alternate complete_job() default implementation
Let jobs sleep like regular Linux tasks by suspending and waking them
with a one-shot timer. Plugins can opt into using this implementation
instead of the classic complete_job() implementation (or custom
implementations).
Fix RCU locking in sys_get_rt_task_param()
sys_get_rt_task_param() is rarely used and apparently attracted some
bitrot.
Free before setting NULL to prevent memory leak
Add hrtimer_start_on() support
This patch replaces the previous implementation of hrtimer_start_on() by
now using smp_call_function_single_async() to arm hrtimers on remote
CPUs.
Expose LITMUS^RT system calls via control page ioctl()
Rationale: make LITMUS^RT ops available in a way that does not create
merge conflicts each time we rebase LITMUS^RT on top of a new kernel
version. This also helps with portability to different architectures,
as we no longer need to patch each architecture's syscall table.
Pick non-zero syscall ID start range
To avoid interfering with Linux's magic reserved IOCTL numbers
Don't preempt before time check in sleep_until_next_release()
Avoid preempting jobs that are about to go to sleep soon anyway.
LITMUS^RT proc: fix wrong memset()
TRACE(): add TRACE_WARN_ON() helper
Useful to replace BUG_ON() and WARN_ON() with a non-fatal
TRACE()-based equivalent.
Add void* plugin_state pointer to task_struct
LITMUS^RT: split task admission into two functions
Plugin interface: add fork_task() callback
LITMUS^RT: Enable plugins to permit RT tasks to fork
one-shot complete_job(): set completed flag
This could race with a SIGSTOP or some other forced suspension, but
we'll let plugins handle this, should they actually care.
FP: add list-based ready queue
LITMUS^RT core: add should_wait_for_stack() callback
Allow plugins to give up when waiting for a stack to become available.
LITMUS^RT core: add next_became_invalid() callback
LITMUS^RT core: add post-migration validation callback
LITMUS^RT core: be more careful when pull-migrating tasks
Close more race windows and give plugins a chance to validate
tasks after they have been migrated.
Add KConfig options for timer latency warnings
Add reservation creation API to plugin interface & syscalls
LITMUS^RT syscall: expose sys_reservation_create() via ioctl()
Add reservation configuration types to rt_param.h
Add basic generic reservation-based scheduling infrastructure
Switch to aligned quanta by default.
For first-time users, aligned quanta is likely what's expected.
LITMUS^RT core: keep track of time of last suspension
This information is needed to insert ST_COMPLETION records for
sporadic tasks.
add fields for clock_nanosleep() support
Need to communicate the intended wake-up time to the plugin wake-up handler.
LITMUS^RT core: add generic handler for sporadic job arrivals
In particular, check if a job arrival is triggered from a
clock_nanosleep() call.
add litmus->task_change_params() callback to plugin interface
Will be used by adaptive C-EDF.
Call litmus->task_change_params() from sys_set_rt_task_param()
Move trace point definition to litmus/litmus.c
If !CONFIG_SCHED_TASK_TRACE, but CONFIG_SCHED_LITMUS_TRACEPOINT, then
we still need to define the tracepoint structures.
This patch should be integrated with the earlier sched_task_trace.c
patches during one of the next major rebasing efforts.
LITMUS^RT scheduling class: mark enqueued task as present
Remove unistd_*.h
rebase fix: update to new hrtimer API
The new API is actually nicer and cleaner.
rebase fix: call lockdep_unpin_lock(&rq->lock, cookie)
The LITMUS^RT scheduling class should also do the LOCKDEP dance.
LITMUS^RT core: break out non-preemptive flag defs
Not every file including litmus.h needs to know this.
LITMUS^RT core: don't include debug_trace.h in litmus.h
Including debug_trace.h introduces the TRACE() macro, which causes
symbol clashes in some (rather obscure) drivers.
LITMUS^RT core: add litmus_preemption_in_progress flags
Used to communicate that a preemption is in progress. Set by the
scheduler; read by the plugins.
LITMUS^RT core: revise is_current_running() macro
|