From: "zhenyu.ren via lttng-dev" <lttng-dev@lists.lttng.org>
To: "lttng-dev" <lttng-dev@lists.lttng.org>
Subject: [lttng-dev] what will happen during tracing if getcpu() doesn't return correct cpu number occasionally?
Date: Wed, 07 Jul 2021 10:37:39 +0800 [thread overview]
Message-ID: <a286a436-454c-4aa1-b184-cccd0825370e.zhenyu.ren@aliyun.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 795 bytes --]
Hi,
I know lttng-ust tracepoint process uses per cpu lockless ringbuffer algorithm for high performance so that it relies on getcpu() to return the cpu number on which the app is running.
Unfortunately, I am working on arm that linux kernel does not support vdso getcpu() implemention and one getcpu() will take 200ns!!!
My question is :
1. do you have any advice for that?
2. If I implement a cache-version for getcpu()(just like getcpu() implemention before kernel 2.6.23 ), what will happen during tracing process?
Since use of the cache could speed getcpu() calls, at the cost that there was a very small chance that the returned cpu number would be out of date, I am not sure whether the "wrong" cpu number will result in the tracing app crashing?
Thanks
zhenyu.ren
[-- Attachment #1.2: Type: text/html, Size: 2331 bytes --]
[-- Attachment #2: Type: text/plain, Size: 156 bytes --]
_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
next reply other threads:[~2021-07-07 2:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-07 2:37 zhenyu.ren via lttng-dev [this message]
2021-07-07 13:46 ` [lttng-dev] what will happen during tracing if getcpu() doesn't return correct cpu number occasionally? Mathieu Desnoyers via lttng-dev
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=a286a436-454c-4aa1-b184-cccd0825370e.zhenyu.ren@aliyun.com \
--to=lttng-dev@lists.lttng.org \
--cc=zhenyu.ren@aliyun.com \
/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;
as well as URLs for NNTP newsgroup(s).