From nobody Fri Dec 19 16:09:35 2025 Received: from mail-qv1-f74.google.com (mail-qv1-f74.google.com [209.85.219.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9E0D5301481 for ; Fri, 5 Dec 2025 10:07:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764929283; cv=none; b=E9t3wpf5dabAkUN2EpI48/hvNvYs8hlmBN2OL18jVootEo9Dh+CIDN0Pt4jZabELgUQThq8m/3CPup/q8pXrj1+TiuMSo2c2qCHTkjTQZB2X/cfd7UbdRTRmkDrWIR8goU485yzbxOWBCD7RPn/ZTj3oCpuBGH8Ko0vkpqPGvZE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764929283; c=relaxed/simple; bh=f+Bi8mZTeGafomlGFzHKwrnmHRNBNQ4WSGiIL2SQtg8=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=be+F77aP+Zy51My6LZnZ7oSKXJ9UX3coBILsC0AtLaTEDAizizykMZ7uDg3SQdxKea6gP5DGI8yPvnE1/6zoxVx7zV1WZu3UWFCe9+hdhCu6REKm63ME6F1bjGEIpmcEePoLNOQrgWBnIq/gCdsgBBXP66oUnmY0w0huvRsFjz8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--edumazet.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=bxEysfpz; arc=none smtp.client-ip=209.85.219.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--edumazet.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="bxEysfpz" Received: by mail-qv1-f74.google.com with SMTP id 6a1803df08f44-8823acf4db3so40437496d6.3 for ; Fri, 05 Dec 2025 02:07:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764929275; x=1765534075; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=NdoRHwdBRcVr4ov9K8oFafm4FBnHa9hB8kWutQyDhrg=; b=bxEysfpzIE3UaEvgKZYd8Q2xWPV+aum3F72Bl+C79x6OIbUTweicLCY/2UpIEwXB54 s7GA6dhPfSZqZxNbcxl4wnojSItextlpZrxxigG7g3IWDbmU60KSaEbXE8COcXeWrXqg jAhhMKZ6OVwV5ouQctNiqtJN45lN1q77eHhdqbyaRv9ytc+se2flBsRpziDqmj+xf52t fwweVb7zEUyH3pHNEb7N7MAg6eX69PFCZIQrDEreJY0wbH8yDMvV0phDxuGiedeW+Uxy eEZuGXrzJHEw9RpRfXAJkWxRLyMpGsPM2sFYy5g8TKz1ZBVFzfDNqqCkjL0v5eJPunZK wE7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764929275; x=1765534075; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=NdoRHwdBRcVr4ov9K8oFafm4FBnHa9hB8kWutQyDhrg=; b=JYl+MJnGtOtnjpCIpRtFbdO+tMIKuse50X4xRS5SLYFEdAtse8YVr79zgAjl/FOXRs TMyCErPONPlBCjs5fv4zwAQ7pCLWQQIS42E1cSd079mm4HtRW5Qmf3nqrIsGVX+/C5ZB cXhcnjMxSCU8LOGh83oQCOiAD8CuZDED9smMfxYeKW3TS5QWbJB0IxU4UzSLKbh8A7Qw ED34oHK4tNodVy+2Ui4+DQPBAQ+/mb2Ftsagxa76Ay8BMNQFqSd8WUSyQpLmjcIUDDUD Mr6vxzu/Yc8SBpRF8uO4aPV3k7yQhMBnxwUiykKcJJzNlDNlwdb8wUTesjyB79y/xVot AwWQ== X-Gm-Message-State: AOJu0YzAtXFjpH0dltg2Vdls4qyDcEYy9QgLj7rrZCm4KCRI2Jv9oePP 5ycVG8vt0YV2YCO2T9piTOVKyCy2ZFt7htBTCGG9DVC3/HRlxMqU+W7g2m8KX96e5/2AMAOV6By jZMUqUfnyovO4Zw== X-Google-Smtp-Source: AGHT+IHFOr51CEaXSR0U0LwkRxPrOi5qGN6hUWjiGF3xYkqRTkqirwV90tfKDRomy21aAqFacehqQnxfJPS34w== X-Received: from qvbmv5.prod.google.com ([2002:a05:6214:3385:b0:880:880e:3b91]) (user=edumazet job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6214:2625:b0:81c:96cc:f7ec with SMTP id 6a1803df08f44-888248119d4mr100897446d6.12.1764929274899; Fri, 05 Dec 2025 02:07:54 -0800 (PST) Date: Fri, 5 Dec 2025 10:07:53 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.52.0.223.gf5cc29aaa4-goog Message-ID: <20251205100753.4073221-1-edumazet@google.com> Subject: [PATCH] rseq: always inline rseq_debug_syscall_return() From: Eric Dumazet To: Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Mathieu Desnoyers Cc: linux-kernel , Eric Dumazet , Eric Dumazet Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" To get full benefit of commit eaa9088d568c ("rseq: Use static branch for syscall exit debug when GENERIC_IRQ_ENTRY=3Dy"), clang needs __always_inline instead of inline qualifier. Tested: for i in {1..10}; do taskset -c 4 perf5 bench syscall basic -l 100000000 | = grep "ops/sec"; done Before: 15,490,350 ops/sec 15,564,199 ops/sec 15,450,324 ops/sec 15,443,986 ops/sec 15,519,631 ops/sec 15,400,475 ops/sec 15,282,792 ops/sec 15,464,758 ops/sec 15,344,973 ops/sec 15,283,429 ops/sec After: 15,940,189 ops/sec 15,971,037 ops/sec 15,963,332 ops/sec 15,897,626 ops/sec 15,824,637 ops/sec 15,719,760 ops/sec 15,823,175 ops/sec 15,745,080 ops/sec 15,930,646 ops/sec 15,906,730 ops/sec Signed-off-by: Eric Dumazet Reviewed-by: Mathieu Desnoyers --- include/linux/rseq_entry.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/rseq_entry.h b/include/linux/rseq_entry.h index c92167ff8a7fbd1a0771d5a79c71ee8bc4a0f8bf..a36b472627dec83a9a196eb33b8= 3e8d39061ffbe 100644 --- a/include/linux/rseq_entry.h +++ b/include/linux/rseq_entry.h @@ -596,7 +596,7 @@ static __always_inline void rseq_exit_to_user_mode_lega= cy(void) =20 void __rseq_debug_syscall_return(struct pt_regs *regs); =20 -static inline void rseq_debug_syscall_return(struct pt_regs *regs) +static __always_inline void rseq_debug_syscall_return(struct pt_regs *regs) { if (static_branch_unlikely(&rseq_debug_enabled)) __rseq_debug_syscall_return(regs); --=20 2.52.0.223.gf5cc29aaa4-goog