Re: [PATCH 0/2] m68k: Add vDSO support for TLS and clock_gettime64
"Andreas K. Huettel" <[email protected]> Thu, 08 Jan 2026 22:46:12 +0100
| Newsgroups | gmane.comp.lib.glibc.alpha,gmane.linux.debian.ports.68k |
|---|---|
| Organization | Gentoo Linux |
| Message-ID | <2770965.ElGaqSPkdT@pinacolada> |
--nextPart5415444.GXAFRqVoOG Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8"; protected-headers="v1" From: "Andreas K. Huettel" <[email protected]> To: [email protected] Date: Thu, 08 Jan 2026 22:46:12 +0100 Message-ID: <2770965.ElGaqSPkdT@pinacolada> Organization: Gentoo Linux In-Reply-To: <[email protected]> References: <[email protected]> MIME-Version: 1.0 Am Donnerstag, 8. Januar 2026, 07:18:20 Mitteleurop=C3=A4ische Normalzeit s= chrieb Stefan: > This series adds vDSO support for m68k, enabling userspace to access > the thread pointer and clock_gettime64 without syscall overhead. After the release only please (given other concerns are addressed) >=20 > The m68k vDSO provides a data page mapped at a fixed offset from the > ELF header (passed via AT_SYSINFO_EHDR). The kernel maintains the > thread pointer and timing data in this page, updating them on context > switches. >=20 > Patch 1 optimizes __m68k_read_tp() to read the thread pointer directly > from the vDSO data page instead of using the get_thread_area syscall. > This significantly reduces overhead for TLS access, which is a frequent > operation in threaded applications. >=20 > Patch 2 enables the vDSO clock_gettime64 by defining > HAVE_CLOCK_GETTIME64_VSYSCALL along with the necessary VDSO_NAME and > VDSO_HASH for symbol lookup. This allows glibc to use the > kernel-provided __vdso_clock_gettime64 for fast time retrieval. >=20 > Both changes include fallback paths for older kernels that lack vDSO > support. >=20 > Performance Results (QEMU Quadra 800) > ------------------------------------- > Before (syscall): ~2057 ns/call > After (vDSO): ~675 ns/call > Improvement: ~3x faster >=20 > Tested on qemu-system-m68k with Linux 6.18 (Debian/m68k). >=20 > Stefan Reinauer (2): > m68k: Use vDSO for thread pointer access > m68k: Enable vDSO clock_gettime64 >=20 > sysdeps/unix/sysv/linux/m68k/m68k-helpers.c | 77 ++++++++++++++++++++- > sysdeps/unix/sysv/linux/m68k/sysdep.h | 7 ++ > 2 files changed, 83 insertions(+), 1 deletion(-) >=20 >=20 =2D-=20 Andreas K. H=C3=BCttel [email protected] Gentoo Linux developer (council, toolchain, base-system, perl, libreoffice) --nextPart5415444.GXAFRqVoOG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQKuBAABCgCZFiEE/Rnm0xsZLuTcY+rT3CsWIV7VQSoFAmlgJaQbFIAAAAAABAAO bWFudTIsMi41KzEuMTEsMiwyXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25z Lm9wZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRGRDE5RTZEMzFCMTkyRUU0REM2M0VB RDNEQzJCMTYyMTVFRDU0MTJBAAoJENwrFiFe1UEqBCkP+I/8YteRx7yEoDfOcr7+ Z0J/cSM2LUriFUsLYy9TY0vLYJMb5eeyAy6cgOFt0lZGsaZf2F/NLoIVzwdwFO0R vVl0Lp7W7pspo/PzE7WQBx5U2RFtX8aUwPkyViKxj6c+cGKbIQHQtoQHlhraGD99 q0q5FBO2QgVFoXfnby129G1g2/qRXF7Q31AfXISwgVecrzJHFQn1LYkRFLz1u6gK yQCmPm6oknTJbgb3sDOQH3zGq0pVD3xNDmhjhBS9Vpe1BQETq7HZpW7dUyYdXp13 Bzqvt5hgoc5qZxlEPLs1Bdmm1jgIulF6NRar7ak4/D7XJokcq+whBRT9f+imHfw/ cC2J3X4aHybPN82q3fCxuT/61/KUurxhdT8YTu/xF256127NkffEQAgXsA7njGeI 5ULcBmRlpEgzM95feVH5j6UDgl7ZVXWHTOhGDFcMFWwuORxCHasdhLCyqNlOyG/4 EGgeubl3Eu0hLqOv9vusgncSsXlbFEUe0VYN0cDOUbE0rMUVsx2Lr2tcBeUCr3zQ 1AyjkLc+apwOItoo5p6/niZT5w2Htm8O1pSvh1LaThv3tOYoI5IlbeCf0/MdX38B 0dTMuruyaSIeJSZSk/lk3orrLqb7aqAi4ClsPm8bmnFtDkq4VmiRJpSxxttey0H1 ZJkpogC0bQQnYWDWLr7Mi2U= =EHfn -----END PGP SIGNATURE----- --nextPart5415444.GXAFRqVoOG--