]> git.baikalelectronics.ru Git - kernel.git/commit
posix-cpu-timers: Utilize timerqueue for storage
authorThomas Gleixner <tglx@linutronix.de>
Tue, 27 Aug 2019 19:31:02 +0000 (21:31 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 28 Aug 2019 09:50:43 +0000 (11:50 +0200)
commit61c966701c1aabb737ca2efea9bf8297a9ba46a3
treeac8ed446c0ae7fcdf72285d5ca99531a3f96560b
parentbdbf189dc5d44a55db3e23ab3e7306be3b60ea48
posix-cpu-timers: Utilize timerqueue for storage

Using a linear O(N) search for timer insertion affects execution time and
D-cache footprint badly with a larger number of timers.

Switch the storage to a timerqueue which is already used for hrtimers and
alarmtimers. It does not affect the size of struct k_itimer as it.alarm is
still larger.

The extra list head for the expiry list will go away later once the expiry
is moved into task work context.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Frederic Weisbecker <frederic@kernel.org>
Link: https://lkml.kernel.org/r/alpine.DEB.2.21.1908272129220.1939@nanos.tec.linutronix.de
include/linux/posix-timers.h
include/linux/timerqueue.h
kernel/time/posix-cpu-timers.c