From nobody Mon Feb 9 14:33:57 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1AAF51FC7E5; Mon, 3 Mar 2025 11:11:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741000282; cv=none; b=pqdvL7P5FrTYAlnBw6VQcpWg0UGXtVdk2WDIU4NXXqgM9N8AKt3YhfgJSZDN4ReLCytEZo9zKymBhbZjzdqiFdZu8eZTFrlkKRCC0CsXn0gQ39uXUA11Q1VgckvLWILFFN/RZRIsmvuZQco26uu6pCvZa/NyDTLh6nVqr6jlPeM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741000282; c=relaxed/simple; bh=5ltcJb5ck+v1HPJ6+Nhh/UjH+dypvfglC/hoMlP4Jeg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=lF9A5QXL+yOAKQFnnY81jv/KrPtcCFHRxAaSr0NZwlyq0OTxKPJmcd9R2UZAddlP07jDhIPCWJaK6yDwR0FPHxe6LHiwV9pBgBs7a9/RaFlEYeS3yVGtWdEeFaKTrJHhd5ZIAT73dB+cYbysJxlPi4KpfM6mvSwbNQYaZTuSbpc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=qhBdyCjx; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=BMb3X3SY; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="qhBdyCjx"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="BMb3X3SY" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1741000278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HgkXR8Ms7wQS05VGAhqJOHjZc2vDa+KQurvhzWf1zv4=; b=qhBdyCjxtiKLWvOc1plokn7HfcVzmwf+d4glPAKt3DEO52YztEmLk02vb7L3VZogzU2A+4 kTs/E5ByKXP8uxQAXoDvY2FzGgDTE/UwbpxuKNixzQm5PoM/G7f8h9l/K3TWY8YtJv6qIE 6zEkYZnS+jXRTBXgB/usq3SvKKk97lqoryzHUq0M63j6tngeCcCLtVeZAPDdVHBVuKnm+x GOK8rRB+IXVgo58Xt7K7XisPKf3Ikmf+bDcbXUTqt709HU9avzv7ceji+wiU9dlaSgDlpC rM9eQEz3o52fHaITdsZRgMUYFGF5zkCTogNt5Phtjl5yY1MgwrKjP+SarcanYg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1741000278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HgkXR8Ms7wQS05VGAhqJOHjZc2vDa+KQurvhzWf1zv4=; b=BMb3X3SY4t1L7AJIV4rv6PFcxHgHInWR8mh99SkR1hwnPPvG4cImQh/oz7XKHSBifrGyMb AArbHGlpDvR3nyBg== Date: Mon, 03 Mar 2025 12:11:20 +0100 Subject: [PATCH 18/19] vdso: Move arch related data before basetime Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250303-vdso-clock-v1-18-c1b5c69a166f@linutronix.de> References: <20250303-vdso-clock-v1-0-c1b5c69a166f@linutronix.de> In-Reply-To: <20250303-vdso-clock-v1-0-c1b5c69a166f@linutronix.de> To: Andy Lutomirski , Thomas Gleixner , Vincenzo Frascino , Catalin Marinas , Will Deacon , Anna-Maria Behnsen , Frederic Weisbecker , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Naveen N Rao , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Arnd Bergmann Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-arch@vger.kernel.org, Nam Cao , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1741000267; l=2232; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=+5uVvlPBOccXpBrllKubuXiCPd0eBucGi0zbF33gT3U=; b=X+HQHN+N5jVKZbjCjgYkbSkIIE7aQboC/nbk/mfHTATXfKThuTtUk4+181IgylalZLiBJjY7y fSrOanqYWacAJNG8ttNOKFyoifVvtbJU3lYM7zULF1yjrqrrAfTAZQe X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= From: Anna-Maria Behnsen Architecture related vdso data is required in fastpath when acquiring CLOCK_MONOTONIC or CLOCK_REALTIME. At the moment, this information is located at the end of the vdso_time_data structure. The whole structure has to be loaded into cache to be able to access this information. To minimize the number of required cachelines, the architecture specific vdso data struct is moved right before the basetime (basetime information is required anyway). This change does not have an impact on architectures with CONFIG_ARCH_HAS_VDSO_DATA=3Dn. All other architectures could spare reading unnecessary cachelines. Signed-off-by: Anna-Maria Behnsen Signed-off-by: Nam Cao Signed-off-by: Thomas Wei=C3=9Fschuh --- include/vdso/datapage.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/vdso/datapage.h b/include/vdso/datapage.h index 1df22e8bb9b31153546b72b1e8b8c8aeaed7d9e3..bcd19c223783be7c22f90120330= e7dddd0496f1a 100644 --- a/include/vdso/datapage.h +++ b/include/vdso/datapage.h @@ -70,6 +70,8 @@ struct vdso_timestamp { =20 /** * struct vdso_time_data - vdso datapage representation + * @arch_data: architecture specific data (optional, defaults + * to an empty struct) * @seq: timebase sequence counter * @clock_mode: clock mode * @cycle_last: timebase at clocksource init @@ -83,8 +85,6 @@ struct vdso_timestamp { * @tz_dsttime: type of DST correction * @hrtimer_res: hrtimer resolution * @__unused: unused - * @arch_data: architecture specific data (optional, defaults - * to an empty struct) * * vdso_time_data will be accessed by 64 bit and compat code at the same t= ime * so we should be careful before modifying this structure. @@ -105,6 +105,8 @@ struct vdso_timestamp { * offset must be zero. */ struct vdso_time_data { + struct arch_vdso_time_data arch_data; + u32 seq; =20 s32 clock_mode; @@ -125,8 +127,6 @@ struct vdso_time_data { s32 tz_dsttime; u32 hrtimer_res; u32 __unused; - - struct arch_vdso_time_data arch_data; } ____cacheline_aligned; =20 #define vdso_clock vdso_time_data --=20 2.48.1