public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: Ben Niu <BenNiu@meta.com>
Cc: catalin.marinas@arm.com, will@kernel.org, tytso@mit.edu,
	Jason@zx2c4.com, linux-arm-kernel@lists.infradead.org,
	niuben003@gmail.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tracing: Enable kprobe tracing for Arm64 asm functions
Date: Mon, 17 Nov 2025 10:34:22 +0000	[thread overview]
Message-ID: <aRr6Ll7h29dpt7zz@J2N7QTR9R3> (raw)
In-Reply-To: <aQOpd14RXnyQLOWR@meta.com>

On Thu, Oct 30, 2025 at 11:07:51AM -0700, Ben Niu wrote:
> On Thu, Oct 30, 2025 at 12:35:25PM +0000, Mark Rutland wrote:
> > Is there something specific you want to trace, but cannot currently
> > trace (on arm64)?
> 
> For some reason, we only saw Arm64 Linux asm functions __arch_copy_to_user and
> __arch_copy_from_user being hot in our workloads, not those counterpart asm
> functions on x86, so we are trying to understand and improve performance of
> those Arm64 asm functions.

Are you sure that's not an artifact of those being out-of-line on arm64,
but inline on x86? On x86, the out-of-line forms are only used when the
CPU doesn't have FSRM, and when the CPU *does* have FSRM, the logic gets
inlined. See raw_copy_from_user(), raw_copy_to_user(), and
copy_user_generic() in arch/x86/include/asm/uaccess_64.h.

Have you checked that inlining is not skewing your results, and
artificially making those look hotter on am64 by virtue of centralizing
samples to the same IP/PC range?

Can you share any information on those workloads? e.g. which callchains
were hot?

Mark.


  reply	other threads:[~2025-11-17 10:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-27 18:17 [PATCH] tracing: Enable kprobe tracing for Arm64 asm functions Ben Niu
2025-10-29 14:33 ` Mark Rutland
2025-10-29 23:53   ` Ben Niu
2025-10-30 12:35     ` Mark Rutland
2025-10-30 18:07       ` Ben Niu
2025-11-17 10:34         ` Mark Rutland [this message]
2025-12-10 20:16           ` Withdraw " Ben Niu
2025-12-12 16:33             ` Mark Rutland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aRr6Ll7h29dpt7zz@J2N7QTR9R3 \
    --to=mark.rutland@arm.com \
    --cc=BenNiu@meta.com \
    --cc=Jason@zx2c4.com \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=niuben003@gmail.com \
    --cc=tytso@mit.edu \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox