zephyr/arch
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
..
arc sys_clock: Fix unsafe tick count usage 2018-10-16 15:03:10 -04:00
arm kernel: New timeslicing implementation 2018-10-16 15:03:10 -04:00
common tests: benchmarks: timing_info: Enable benchmarks for riscv32. 2018-08-20 06:51:25 -07:00
nios2 kernel: New timeslicing implementation 2018-10-16 15:03:10 -04:00
posix POSIX arch: Add stub for sys_arch_reboot() 2018-10-09 16:15:45 -04:00
riscv32 kernel: New timeslicing implementation 2018-10-16 15:03:10 -04:00
x86 kernel: New timeslicing implementation 2018-10-16 15:03:10 -04:00
xtensa kernel: Using the same paramenters names in a specific function 2018-09-28 07:58:19 +05:30
CMakeLists.txt arch: Cmake: Add __ZEPHYR_SUPERVISOR__ macro for arch files. 2018-05-15 17:48:18 +03:00
Kconfig arch: add big endian support 2018-10-10 09:28:05 -04:00