From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=216.40.44.15 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796135815; b=CWpfsCiKkA2s/rM4MAhp7sLC7Ty1mn+KvXHhEJOzW5LF7YaIXT8OZczkbxhIeScI96PJ S/aKGuGm5xaft1A5X7jod7vlleCYBSNZfFCYy2GYd/uwFNefEEsEO4ZFpe9B5cZwievR5 z1XRw6EMALee1C6jGgaBcEM1M/SSTg1x0YRjKfBUGJVHz5fDQ4uIgY4UZ4tk6IG74UA7/ z7w7qJZJTsy/ug64QrKytiSr/OVYhX/72dlpE5mq1UWc6NFjTlsRInfyRZXisjBUIEVPg ITDItQcyxVWn2l8tEZoIuj8sOpbpsrYr5HTbf2TWcyXOOnSnV9cnIV75wBgT8BgqZTQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796135815; h=DMARC-Filter:Received:Received:Date:From:To:Cc:Subject:Message-ID: In-Reply-To:References:X-Mailer:MIME-Version:Content-Type: Content-Transfer-Encoding:X-Rspamd-Server:X-Rspamd-Queue-Id: X-Stat-Signature:X-Spam-Status:X-Session-Marker:X-Session-ID: DKIM-Signature:X-HE-Tag:X-HE-Meta; bh=ZXqp9sNf2x4njRDrSiU4aN0j6KA1bCCIzKeJmTobHXA=; b=O0C+xK2gH3J6B2hkfOugkClGHC/u9OdUVV3oM5nXz9+9BzIGnpQHgj8AaG9xwF7GAF2n fnXJnXPvhaWUcflGFTLKjBHa3PSk8UZ59vmY84EH3rzT0mQkOKWT9E1oFk5ZmFT4x72tP Msq69Jass4WCh1Zhsw7v/6WydV0/z0CBfYJIErW7VMNU6ZZqpF+DEWGTD5Z8WYylRTm4M n7YAhpkiYd3VTzjxNf1iS+5LoptUhFW1p5NEiBIxlJoQQWGQAS+AXjHFpLOFZ0r8++wnY VUWYU2+KoY96o3HFe7AYKc2goyaBhr9btgh2dQFMdUtM5In9Ftj9YEVNqr14LxGSW3Q== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=goodmis.org; spf=pass smtp.mailfrom=goodmis.org; dkim=pass header.d=goodmis.org header.i=@goodmis.org header.a=rsa-sha256 header.s=dkim1 header.b=JAAJnWSJ; arc=none smtp.remote-ip=216.40.44.15 Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 39A7D606A31A; Tue, 1 Dec 2026 14:36:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 39A7D606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=goodmis.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=goodmis.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=goodmis.org header.i=@goodmis.org header.a=rsa-sha256 header.s=dkim1 header.b=JAAJnWSJ Received: from omf03.hostedemail.com (lb01a-stub [10.200.18.249]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 6347C1A0D98; Tue, 1 Dec 2026 14:36:50 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: rostedt@goodmis.org) by omf03.hostedemail.com (Postfix) with ESMTPA id 57B756000A; Tue, 1 Dec 2026 14:36:44 +0000 (UTC) Date: Tue, 1 Dec 2026 09:36:42 -0500 From: Steven Rostedt To: Peter Zijlstra Cc: Song Liu , linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, live-patching@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, bpf@vger.kernel.org, mhiramat@kernel.org, mark.rutland@arm.com, tglx@kernel.org, frederic@kernel.org, paulmck@kernel.org, catalin.marinas@arm.com, will@kernel.org, maddy@linux.ibm.com, mpe@ellerman.id.au, npiggin@gmail.com, chleroy@kernel.org, pjw@kernel.org, palmer@dabbelt.com, aou@eecs.berkeley.edu, alex@ghiti.fr, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, ojeda@kernel.org, kernel-team@meta.com Subject: Re: [PATCH v3 01/22] x86/paravirt: Mark native pv_ops helpers notrace Message-ID: <20261201093642.57ab2300@gandalf.local.home> In-Reply-To: <20261201074353.GB2883950@noisy.programming.kicks-ass.net> References: <20261201042201.3199928-1-song@kernel.org> <20261201042201.3199928-2-song@kernel.org> <20261201074353.GB2883950@noisy.programming.kicks-ass.net> X-Mailer: Claws Mail 3.20.0git84 (GTK+ 2.24.33; x86_64-pc-linux-gnu) X-Mailing-List: linux-trace-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspamout04 X-Rspamd-Queue-Id: 57B756000A X-Stat-Signature: mgx3umkf1nrgddix9cboaanju3er4bfc X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Session-ID: U2FsdGVkX1/Xe4ggDKc0MEGE5DQpL6cn5NrBI9bZ1UQ= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=goodmis.org; h=date:from:to:cc:subject:message-id:in-reply-to:references:mime-version:content-type:content-transfer-encoding; s=dkim1; bh=ZXqp9sNf2x4njRDrSiU4aN0j6KA1bCCIzKeJmTobHXA=; b=JAAJnWSJBrtEZjNpF9+VZlomvvVzOtYsQ+r0OKGVLsKYnMK5kMEsp/MrZyyo3K+/gZDH7NCDqAqvwwUlFNAzvsmBysWOu5/SRltS1VtV8egpk6Sg68Wk9rCwTijhxwKENn15kJcEeKrcaY2jxD8Wx9gZvXaz2QNVIHilNFsTS9Y= X-HE-Tag: 1796135804-15097 X-HE-Meta: U2FsdGVkX19q3ScQl3wkURluAlNr7xzycvc2TiJKdmlng4ghv4NcoRoNMSEYCo6W2ELrnRs+BPe2P709ajuwAkv1xLSWwGii4qCsX3R4Tn81UkwiwAtQvgX5jJ5LySmT1Cf6JfRiOTbhsuvKCMuoBprChkXos3Du8DeSNjrL8pdk84Az86SrNRT6xryWd3qJfkw19KQDNxa7pnKmWaC6dns8DG6sDKEBu803Hk+jRejWaTYMbu5uFMRt/YhA5lxMVyy1EihOSlGFSDQ+ihqGVY2pFhN7TTl28QQetgYn2WCWISERjlu6aaloD/FJjezRTVunh//EQnbJmdA9fC3MoboyQo6lWgqJ7lI5rZjHjuICNw9kbtoWDQfxWuw9l4iU On Tue, 1 Dec 2026 08:43:53 +0100 Peter Zijlstra wrote: > On Mon, Nov 30, 2026 at 08:21:40PM -0800, Song Liu wrote: > > The native implementations of several pv_ops are static inline functions > > in headers. pv_ops stores their address, so with CONFIG_PARAVIRT_XXL the > > compiler emits an out-of-line copy of each one, and pv_ops calls go to > > that copy. Today these copies are not traced only because the inline > > macro implies notrace. > > > > Some callers of these helpers must not be traced: > > restore_processor_state() is notrace and runs during resume, > > __switch_to() is __notrace_funcgraph, and arch/x86/kernel/cpu/common.c > > and arch/x86/kernel/tsc.c, which call several of them, are built > > without -pg. > > > > Mark these helpers notrace explicitly, like native_write_msr() and > > native_write_msr_safe() already are, so they stay untraced if inline no > > longer implies notrace. No functional change. > > I must say.. I hate this with a passion. This is unmaintainable garbage. Can you elaborate more? What exactly do you hate? It's not much different than the noinstr code. That is, basically everything that should be noinstr should also be notrace. notrace may have a little bigger scope than noinstr but not by much. Note, if you really want something inlined, use "__always_inline" which will never be traced. But "inline" itself is leaving it up to the compiler to decide. Like noinstr, this means if you really do not want something traced, you need to use __always_inline or explicitly state notrace. -- Steve