[lttng-dev] lttng-ust on arm64 getting bogged down by the getcpu syscall (taking more than 600ns per call)

Jérémie Galarneau jgalar at efficios.com
Wed Oct 12 05:19:01 EDT 2022


Hi,

I think the first problem you will run into is that rseq is only available on kernels 4.18+.

As far as I know, starting with glibc 2.35, getcpu() defers to using rseq when available.

Is there a way you can upgrade these two components and see if the overhead is reduced?

Jérémie

--
Jérémie Galarneau
EfficiOS Inc.
https://www.efficios.com
________________________________
From: lttng-dev <lttng-dev-bounces at lists.lttng.org> on behalf of Akhil Veeraghanta via lttng-dev <lttng-dev at lists.lttng.org>
Sent: October 11, 2022 16:57
To: lttng-dev at lists.lttng.org <lttng-dev at lists.lttng.org>
Subject: [lttng-dev] lttng-ust on arm64 getting bogged down by the getcpu syscall (taking more than 600ns per call)

Hello!

I've run into an issue with getcpu not having a vsdo implementation and taking anywhere from 600ns to 80us (avg 1 us) when using lttng-ust tracepoints.
I am on lttng v2.13 and kernel version 4.9.253-l4t, running on a jetson (arm64). I was digging around and found that rseq might be the recommended next step

I am wondering:

  1.  Are there examples of using rseq system call to replace getcpu
  2.  Are there any existing patches that I can apply to get better getcpu performance

Thanks in advance,
Akhil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.lttng.org/pipermail/lttng-dev/attachments/20221012/23826c6b/attachment.htm>


More information about the lttng-dev mailing list