]> git.baikalelectronics.ru Git - kernel.git/commit
lib/vdso: Mark do_hres() and do_coarse() as __always_inline
authorAndrei Vagin <avagin@gmail.com>
Tue, 12 Nov 2019 01:26:51 +0000 (01:26 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Sep 2022 08:27:47 +0000 (10:27 +0200)
commitf4a09e0d976df48c22c7d36be54e3d2262167ffc
treea4f6470f75f75466b2bcdffa16fcedc7eb283384
parentceda210ab263693ce02d2d844d7dd837c9edd5b0
lib/vdso: Mark do_hres() and do_coarse() as __always_inline

[ Upstream commit 09ea780aaf1ac49ef12971d23aeafbebd8f42ae1 ]

Performance numbers for Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz
(more clock_gettime() cycles - the better):

clock            | before     | after      | diff
----------------------------------------------------------
monotonic        |  153222105 |  166775025 | 8.8%
monotonic-coarse |  671557054 |  691513017 | 3.0%
monotonic-raw    |  147116067 |  161057395 | 9.5%
boottime         |  153446224 |  166962668 | 9.1%

The improvement for arm64 for monotonic and boottime is around 3.5%.

clock            | before     | after      | diff
==================================================
monotonic          17326692     17951770     3.6%
monotonic-coarse   43624027     44215292     1.3%
monotonic-raw      17541809     17554932     0.1%
boottime           17334982     17954361     3.5%

[ tglx: Avoid the goto ]

Signed-off-by: Andrei Vagin <avagin@gmail.com>
Signed-off-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20191112012724.250792-3-dima@arista.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
lib/vdso/gettimeofday.c