Allow setting the realtime flag on low priority threads to disable the
tick without also loosing ipi interrupts.
Change-Id: Ia30e4d20105a65945918fc996c3114c3852963a9
Some architectures might have resrictions on selecting
virtual address depending on properties of particular
VM allocation. This CL allows arch to provide a hook into
virtual address allocator to handle such restictions.
Change-Id: I28e912dcf2cf260b7e6666b6a9384178e41bfa73
If mark_pages_in_use fails to mark the kernel code (or data) as used,
it will get corrupted as the heap starts reusing using it.
Change-Id: I48f62bb68dcbad3268304aa2a1e63e9956128064
-Fixes bug where the code would walk off the end of an arena, not
detecting the case where there is no way to satisfy the request.
Change-Id: I16434f13faa6d5d76aaba5bf3c458d230e4db888
The existing runqueues are scanned on resched until a thread that is
not pinned to another cpu is found.
Per-pu runqueues can be added later to avoid this scan.
Change-Id: Idd7dbddb4b79ef38a0ccd0c42b53f8867020e6cd
Conflicts:
kernel/thread.c
The new priority of the thread may mean that a different thread should run.
Change-Id: Ia683613bb825929b506ea885c6ef303d9748c6a0
Signed-off-by: Arve Hjønnevåg <arve@android.com>
The post SMP algorithm wasn't taking into account time on any given core
if the core was currently idle at the time the load interrupt fired.
Also track rescheduling ipis and condense the output slightly.
-Each cpu's idle thread now doesn't sit in the run queue and is only
selected when no other threads are ready to run. This means there is
now an implicit affinity for the idle threads for each cpu, and reduces
the amount of idle thread thrashing without real affinity (or per cpu
run queues).
-Fix some bitmap logic in the mp_reschedule and mp_mbx_reschedule_irq
code path that probably resulted in not enough reschedules.
-Change a few spots for mp reschedule ipis in general thread path. Add
ipi to thread_resume, remove one from thread_create_etc.
Thanks to a bug report by Arnab Basu, fixed the incorrect waking up of
thread_join waiters on the calling thread, instead of the thread being detached.
If the end of a range is at the end of the virtual address space,
(base + size) is 0. Use (base + size - 1) instead.
Change-Id: I7d02250d765df0ab2bd23b60ee7a484951238c58
Threads marked as real time do not have the preemption timer run against
them and will continue to run until they voluntarily yield or are
preempted by a higher priority thread from irq context.
Add kernel/vm code to handle memory management in large page-aligned
regions of virtual space. This is composed via a pmm (physical
memory manager) and vmm (virtual memory manager) and the architecturally
specific code to manage the mmu.
Add ARMv7 paging code.
Move implementation to stdio.c to sit next to the other
stdio definitions that use the debug output functions. Keep
the declaration of it, though, in printf.h to sit next to
sprintf, etc.
Don't include printf.h directly in other places, rely on stdio.h
to properly pull in these functions.
Change-Id: I357cb04a5c78185b8fde908193b672326c2ee542
Signed-off-by: Dima Zavin <dima@android.com>
Modify platform.h to add definitions of hooks required by
implementation of dynamic timer
Disable setting periodic timer if PLATFORM_HAS_DYNAMIC_TIMER
is chosen.
Fix a warning.