| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
| |
Commit "0c527966 Make release master support optional" uses
__ARCH_HAS_SEND_PULL_TIMERS instead of CONFIG_ARCH_HAS_SEND_PULL_TIMERS
(introduced in commit 0fb33c99) to conditionally compile a pull timer
related code in rt_domain.c. This code is disabled and pull-timer's
state is no longer properly reset. Therefore, a pulled timer cannot be
armed anymore.
|
|
|
|
|
| |
litmus_sched_class wasn't declared static, but it's not used outside
sched.c, so change it's signature to static.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The PFAIR plugin always implicitly assumed !NO_HZ (the schedule
is wrong if NO_HZ is enabled) and does not built if hrtimers are absent:
> litmus/built-in.o: In function `pfair_activate_plugin':
> sched_pfair.c:(.text+0x7f07): undefined reference to `cpu_stagger_offset'
> litmus/built-in.o: In function `init_pfair':
> sched_pfair.c:(.init.text+0x487): undefined reference to `cpu_stagger_offset'
cpu_stagger_offset() is only available if hrtimers are enabled.
This patch makes these dependencies explicit.
|
|
|
|
|
|
| |
C-EDF depends on intel_cacheinfo.c (for get_shared_cpu_map()) which is
only available on x86 architectures. Furthermore, get_shared_cpu_map()
is only available if SYSFS filesystem is present.
|
|
|
|
|
| |
There is currently no need to implement this in ARM.
So let's make it optional instead.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
C-EDF only makes sense on multicore platforms that have shared caches.
Make it possible to disable it on other platforms, in particular,
on those that do not export get_shared_cpu_map().
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Insert PLUGIN_TICK_END tracing point in litmus_tick(). It was lost during
the porting of 2008.3 to 2010.1.
|
|
|
|
|
| |
- With the "ALL" cluster size option the behavior of C-EDF is
equivalent to G-EDF (one single cluster)
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
- kfifo needs to be defined and used differently (see include/linux/kfifo.h)
- spinlock -> raw_spinlock
- include slab.h when using kmalloc and friends
This commit compiles and is the logical end of the merge of Litmus and
2.6.34.
|
|
|
|
|
|
|
|
| |
- get_rr_interval() changed signature
- load_balance() and move_one_tak() are no longer needed
- spinlock_t -> raw_spinlock_t
This commit does not compile.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Simple merge between master and 2.6.34 with conflicts resolved.
This commit does not compile, the following main problems are still
unresolved:
- spinlock -> raw_spinlock API changes
- kfifo API changes
- sched_class API changes
Conflicts:
Makefile
arch/x86/include/asm/hw_irq.h
arch/x86/include/asm/unistd_32.h
arch/x86/kernel/syscall_table_32.S
include/linux/hrtimer.h
kernel/sched.c
kernel/sched_fair.c
|
| |
| |
| |
| |
| |
| | |
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).
|
| |
| |
| |
| |
| |
| | |
The cpumap of CPUs that share the same cache level is not normally
available outside intel_cacheinfo.c. This commit allows to export such
map.
|
| |
| |
| |
| |
| |
| | |
Make sure the plugin is not used by any CPUs while switching.
The CPU performing the switch sends an IPI to all other CPUs forcing
them to synchronize on an atomic variable.
|
| |
| |
| |
| |
| |
| | |
hrtimers are properly rearmed during arm_release_timer() and no longer
after rescheduling (with the norqlock mechanism of 2008.3). This commit
accordingly updates the locations where measures are taken.
|
| |
| |
| |
| |
| | |
Log task completions in job_completion() for PSN-EDF.
This fixes the problem of missing job-completion events for PSN-EDF.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Requeue a task that is already scheduled will cause it to be effectively
in the runqueue twice since scheduled tasks are conceptually the head
of the queue. If a task is still scheduled, then schedule() will do the
right thing and do the requeuing if necessary.
This fixes crashes reported by Glenn and Andrea.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch changes sched_trace.c to use the miscdevice API
instead of doing all the cdev management ourselves. This remove a
chunk of code and we get sysfs / udev integration for free.
On systems with default udev rules, this will result in a /dev/litmus/log
device being created automatically.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This fixes a bug found by liblitmus's regression test suite.
Before:
> ** LITMUS^RT test suite.
> ** Running tests for LINUX.
> ** Testing: don't open FMLP semaphores if FMLP is not supported...
> !! TEST FAILURE open_fmlp_sem(fd, 0) -> -16, Success (expected: EBUSY)
> at tests/fdso.c:21 (test_fmlp_not_active)
> ** Testing: reject invalid object descriptors... ok.
> ** Testing: reject invalid object types...
> !! TEST FAILURE od_open(0, -1, 0) -> -22, Bad file descriptor (expected: EINVAL)
> at tests/fdso.c:51 (test_invalid_obj_type)
> ** Testing: reject invalid rt_task pointers... ok.
> ** Result: 2 ok, 2 failed.
After:
> ** LITMUS^RT test suite.
> ** Running tests for LINUX.
> ** Testing: don't open FMLP semaphores if FMLP is not supported... ok.
> ** Testing: reject invalid object descriptors... ok.
> ** Testing: reject invalid object types... ok.
> ** Testing: reject invalid rt_task pointers... ok.
> ** Result: 4 ok, 0 failed.
|
| |
| |
| |
| |
| |
| |
| |
| | |
The od_table is strictly per-thread and should not be inherited across
a fork/clone. This caused memory corruption when a task exited, which
ultimately could lead to oopses in unrelated code.
Bug and testcase initially reported by Glenn.
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
This patch updates non-preemptive section support in
GSN- and PSN-EDF.
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When a real-time task forks, then its LITMUS^RT-specific fields should be cleared,
because we don't want real-time tasks to spawn new real-time tasks that bypass
the plugin's admission control (if any).
This was broken in three ways:
1) kernel/fork.c did not erase all of tsk->rt_param, only the first few bytes due to
a wrong size argument to memset().
2) It should have been calling litmus_fork() instead anyway.
3) litmus_fork() was _also_ not clearing all of tsk->rt_param, due to another size
argument bug.
Interestingly, 1) and 2) can be traced back to the 2007->2008 port,
whereas 3) was added by Mitchell much later on (to dead code, no less).
I'm really surprised that this never blew up before.
|
| | |
|
| |
| |
| |
| |
| | |
- [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
|
| |
| |
| |
| | |
Add apic interrupt vector for pull_timers() in x86_64 arch.
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Setting FT_TASK_TRACE_MAJOR, LOG_MAJOR, FT_TRACE_MAJOR to 0
allows to have them automatically assigned by the kernel
|
| |
| |
| |
| |
| |
| |
| |
| | |
GSN-EDF and friends rely on being called even if there is currently
no runnable real-time task on the runqueue for (at least) two reasons:
1) To initiate migrations. LITMUS^RT pull tasks for migrations; this requires
plugins to be called even if no task is currently present.
2) To maintain invariants when jobs block.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- remove the call to litmus_tick() from scheduler_tick() just after
having performed the class task_tick() and integrate
litmus_tick() in task_tick_litmus()
- task_tick_litmus() is the handler for the litmus class task_tick()
method. It is called in non-queued mode from scheduler_tick()
|
| |
| |
| |
| |
| |
| |
| | |
Having GSN-EDF log so many things each tick is useful
when tracking down race conditions, but it also makes
it really hard to find anything else. Thus, turn it off by
default but leave it in for future debugging fun.
|
| |
| |
| |
| |
| |
| | |
- Binomial heap "heap" names conflicted with priority heap
of cgroup in kernel
- This patch change binomial heap "heap" names in "bheap"
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
- insert arm_release_timer() in add_relese() path
- arm_release_timer() uses __hrtimer_start_range_ns() instead of
hrtimer_start() to avoid deadlock on rq->lock.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
infrastructure
|