zephyr/drivers
Ramesh Thomas 89ffd44dfb kernel: tickless: Add tickless kernel support
Adds event based scheduling logic to the kernel. Updates
management of timeouts, timers, idling etc. based on
time tracked at events rather than periodic ticks. Provides
interfaces for timers to announce and get next timer expiry
based on kernel scheduling decisions involving time slicing
of threads, timeouts and idling. Uses wall time units instead
of ticks in all scheduling activities.

The implementation involves changes in the following areas

1. Management of time in wall units like ms/us instead of ticks
The existing implementation already had an option to configure
number of ticks in a second. The new implementation builds on
top of that feature and provides option to set the size of the
scheduling granurality to mili seconds or micro seconds. This
allows most of the current implementation to be reused. Due to
this re-use and co-existence with tick based kernel, the names
of variables may contain the word "tick". However, in the
tickless kernel implementation, it represents the currently
configured time unit, which would be be mili seconds or
micro seconds. The APIs that take time as a parameter are not
impacted and they continue to pass time in mili seconds.

2. Timers would not be programmed in periodic mode
generating ticks. Instead they would be programmed in one
shot mode to generate events at the time the kernel scheduler
needs to gain control for its scheduling activities like
timers, timeouts, time slicing, idling etc.

3. The scheduler provides interfaces that the timer drivers
use to announce elapsed time and get the next time the scheduler
needs a timer event. It is possible that the scheduler may not
need another timer event, in which case the system would wait
for a non-timer event to wake it up if it is idling.

4. New APIs are defined to be implemented by timer drivers. Also
they need to handler timer events differently. These changes
have been done in the HPET timer driver. In future other timers
that support tickles kernel should implement these APIs as well.
These APIs are to re-program the timer, update and announce
elapsed time.

5. Philosopher and timer_api applications have been enabled to
test tickless kernel. Separate configuration files are created
which define the necessary CONFIG flags. Run these apps using
following command
make pristine && make BOARD=qemu_x86 CONF_FILE=prj_tickless.conf qemu

Jira: ZEP-339 ZEP-1946 ZEP-948
Change-Id: I7d950c31bf1ff929a9066fad42c2f0559a2e5983
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
2017-04-27 13:46:28 +00:00
..
adc spell: fix Kconfig help typos: /boards /drivers 2017-04-21 21:31:30 +00:00
aio drivers: convert to using newly introduced integer sized types 2017-04-21 10:06:48 -05:00
bluetooth spell: fix Kconfig help typos: /boards /drivers 2017-04-21 21:31:30 +00:00
clock_control spell: fix Kconfig help typos: /boards /drivers 2017-04-21 21:31:30 +00:00
console drivers: console: Do not wait on the DTR signal from the host USB controller. 2017-04-25 02:33:01 +00:00
counter drivers: convert to using newly introduced integer sized types 2017-04-21 10:06:48 -05:00
crc drivers: convert to using newly introduced integer sized types 2017-04-21 10:06:48 -05:00
crypto drivers/crypto: Fix a memory leak in tc shim driver 2017-04-27 13:06:34 +00:00
display drivers: convert to using newly introduced integer sized types 2017-04-21 10:06:48 -05:00
dma spell: Kconfig help typos: /arch 2017-04-24 20:14:53 +00:00
ethernet spell: fix Kconfig help typos: /boards /drivers 2017-04-21 21:31:30 +00:00
flash spell: fix Kconfig help typos: /boards /drivers 2017-04-21 21:31:30 +00:00
gpio spell: fix Kconfig help typos: /boards /drivers 2017-04-21 21:31:30 +00:00
grove spell: fix Kconfig help typos: /boards /drivers 2017-04-21 21:31:30 +00:00
i2c spell: fix Kconfig help typos: /boards /drivers 2017-04-21 21:31:30 +00:00
ieee802154 spell: Kconfig help typos: /arch 2017-04-24 20:14:53 +00:00
interrupt_controller drivers: convert to using newly introduced integer sized types 2017-04-21 10:06:48 -05:00
ipm drivers: convert to using newly introduced integer sized types 2017-04-21 10:06:48 -05:00
pci spell: fix Kconfig help typos: /boards /drivers 2017-04-21 21:31:30 +00:00
pinmux spell: fix Kconfig help typos: /boards /drivers 2017-04-21 21:31:30 +00:00
pwm spell: fix Kconfig help typos: /boards /drivers 2017-04-21 21:31:30 +00:00
random drivers: convert to using newly introduced integer sized types 2017-04-21 10:06:48 -05:00
rtc drivers: convert to using newly introduced integer sized types 2017-04-21 10:06:48 -05:00
sensor sensor: lsm6ds0: fix copy/paste error 2017-04-25 19:27:22 +00:00
serial drivers: convert to using newly introduced integer sized types 2017-04-21 10:06:48 -05:00
shared_irq spell: fix Kconfig help typos: /boards /drivers 2017-04-21 21:31:30 +00:00
slip spell: fix Kconfig help typos: /boards /drivers 2017-04-21 21:31:30 +00:00
spi spell: Kconfig help typos: /arch 2017-04-24 20:14:53 +00:00
timer kernel: tickless: Add tickless kernel support 2017-04-27 13:46:28 +00:00
usb spell: fix Kconfig help typos: /boards /drivers 2017-04-21 21:31:30 +00:00
watchdog drivers: convert to using newly introduced integer sized types 2017-04-21 10:06:48 -05:00
Kconfig drivers: Add support for BBC micro:bit LED display 2017-04-04 08:14:36 +03:00
Makefile crc16: Create function for computing CRC 16 2017-04-13 15:21:42 +03:00