Skip to content

non-tickless kernels incorrectly advance system clock with delayed ticks #12409

Closed
@pabigot

Description

@pabigot

In the discussion of #12332 it was determined that the timer updates around 2018-09 through 2018-10 resulted in an unintentional change of behavior for CONFIG_TICKLESS_KERNEL=n.

Prior to the rework the system clock advanced by one tick on each interrupt, regardless of whether the interrupt was serviced late.

Support for CONFIG_TICKLESS_KERNEL=y inadvertently changed this so that the system clock was advanced by the number of ticks required to align it with the divided hardware clock, regardless of the value of CONFIG_TICKLESS_KERNEL.

The timer implementations need to be reworked so that for CONFIG_TICKLESS_KERNEL=n the original behavior is restored. Note that this will result in an non-linear relation between the hardware and system clocks if the tick interrupt is delayed by at least sys_clock_hw_cycles_per_tick().

Metadata

Metadata

Assignees

Labels

area: TimerTimerbugThe issue is a bug, or the PR is fixing a bugpriority: mediumMedium impact/importance bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions