On Wed, 10 Sep 2025 13:59:02 +0200, Johannes Berg wrote: > On Sun, 2025-08-10 at 13:51 +0800, Tiwei Bie wrote: > > From: Tiwei Bie <tiwei....@antgroup.com> > > > > We are going to support SMP in UML, so we can not hard code > > the CPU and NUMA node in __vdso_getcpu() anymore. > > Correct. But does that mean we actually have to implement it via syscall > in the VDSO? That seems a bit odd? ARM doesn't seem to have getcpu in > the VDSO at all, for example, so could we do the same and just remove > it?
Good idea. I checked the implementations in glibc and musl, and they automatically fall back to the syscall when __vdso_getcpu is not available: https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/sysdep-vdso.h;h=5a33871872da9ccef36293c3ca5eba6503f956e6;hb=HEAD#l36 https://git.musl-libc.org/cgit/musl/tree/src/sched/sched_getcpu.c?h=v1.2.5#n32 I will just remove it in the next version. Regards, Tiwei