[patch 01/16] time: Provide clocksource based sched_clock()
kgene.kim at samsung.com
Mon Apr 25 03:10:33 EDT 2011
Thomas Gleixner wrote:
> Many embedded platforms use the clocksource which is used for
> timekeeping as their sched_clock as well. Though they need to take
> care about the wraparounds as sched_clock() wants to be monotonic
> increasing nsescs. The timekeeping code and the NOHZ core take care of
> the timekeeping clocksource wraparound so we can simply use the
> timekeeping clocksource if possible.
> clocksources which can be used by the clksrc sched_clock must have the
> flag CLOCK_SOURCE_SCHED_CLOCK set. This works with the default (weak)
> sched_clock implementation but the clksrc based function is also
> provided for architectures where multi platform kernels might override
> it. If there is no CLOCK_SOURCE_SCHED_CLOCK available, then the
> function returns the jiffies based sched clock.
> Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
Tested on Samsung stuff...
Tested-by: Kukjin Kim <kgene.kim at samsung.com>
> include/linux/clocksource.h | 1
> include/linux/sched.h | 1
> kernel/sched_clock.c | 12 ----
> kernel/time/Kconfig | 4 +
> kernel/time/timekeeping.c | 125
> 5 files changed, 131 insertions(+), 12 deletions(-)
Kukjin Kim <kgene.kim at samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
More information about the linux-arm-kernel