Re: [PATCH 1/2] vdso: sparc: stub out custom vdso implementation

From: Arnd Bergmann
Date: Mon Jul 07 2025 - 11:46:13 EST


On Mon, Jul 7, 2025, at 17:22, John Paul Adrian Glaubitz wrote:
> Hello Arnd,
>
> On Mon, 2025-07-07 at 16:46 +0200, Arnd Bergmann wrote:
>> Rip out the whole thing and replace it with a minimal stub as we do
>> on parisc and uml. This introduces a small performance regression when
>> using a libc that is aware of the vdso (glibc-2.29 or higher).
>
> Can this performance hit quantified in any way?

It's trivial to test calling glibc clock_gettime() in a loop
on a specific piece of hardware, the difference should largely
depend on how long the timer hardware access takes compared
to the syscall overhead.

On machines that have neither TICK nor STICK clocksource, the
simpler version should even be minimally faster, on those that
have one of the two, there is an added cost for entering the
syscall on every clock_gettime() as we do on architectures without
vdso.

> And is there previous serious where this change was made for other archs?

See
https://lore.kernel.org/lkml/2078551b-c0b0-4201-b8d7-1faafa3647e6@xxxxxxxxxxxxxxxx/#t
for the thread that led to this one.

There is also commit 5f55e098b8d0 ("parisc: Add 64-bit gettimeofday()
and clock_gettime() vDSO functions") that adds similar stubs on
parisc.

Arnd