zephyr/kernel/include
Andy Ross 9098a45c84 kernel: New timeslicing implementation
Instead of checking every time we hit the low-level context switch
path to see if the new thread has a "partner" with which it needs to
share time, just run the slice timer always and reset it from the
scheduler at the points where it has already decided a switch needs to
happen.  In TICKLESS_KERNEL situations, we pay the cost of extra timer
interrupts at ~10Hz or whatever, which is low (note also that this
kind of regular wakeup architecture is required on SMP anyway so the
scheduler can "notice" threads scheduled by other CPUs).  Advantages:

1. Much simpler logic.  Significantly smaller code.  No variance or
   dependence on tickless modes or timer driver (beyond setting a
   simple timeout).

2. No arch-specific assembly integration with _Swap() needed

3. Better performance on many workloads, as the accounting now happens
   at most once per timer interrupt (~5 Hz) and true rescheduling and
   not on every unrelated context switch and interrupt return.

4. It's SMP-safe.  The previous scheme kept the slice ticks as a
   global variable, which was an unnoticed bug.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2018-10-16 15:03:10 -04:00
..
gen_offset.h headers: Fix headers guards 2018-09-17 15:49:26 -04:00
kernel_internal.h kernel: add a new API for setting thread names 2018-09-27 08:58:55 +05:30
kernel_offsets.h ld: Put 'sizeof(struct device)' in the generated offsets header 2018-09-18 16:23:40 +02:00
kernel_structs.h kernel: New timeslicing implementation 2018-10-16 15:03:10 -04:00
ksched.h kernel: New timeslicing implementation 2018-10-16 15:03:10 -04:00
kswap.h kernel: New timeslicing implementation 2018-10-16 15:03:10 -04:00
offsets_short.h headers: Fix headers guards 2018-09-17 15:49:26 -04:00
syscall_handler.h kernel: Fix overflow test problem introduced in 92ea2f9 2018-10-04 05:20:29 -07:00
timeout_q.h kernel/sys_clock: Fix build when !SYS_CLOCK_EXISTS 2018-10-16 15:03:10 -04:00
wait_q.h headers: Fix headers guards 2018-09-17 15:49:26 -04:00