lttng-dev.lists.lttng.org archive mirror
 help / color / mirror / Atom feed
* [lttng-dev] what will happen during tracing if getcpu() doesn't return correct cpu number occasionally?
@ 2021-07-07  2:37 zhenyu.ren via lttng-dev
  2021-07-07 13:46 ` Mathieu Desnoyers via lttng-dev
  0 siblings, 1 reply; 2+ messages in thread
From: zhenyu.ren via lttng-dev @ 2021-07-07  2:37 UTC (permalink / raw)
  To: lttng-dev


[-- 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-07 13:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-07  2:37 [lttng-dev] what will happen during tracing if getcpu() doesn't return correct cpu number occasionally? zhenyu.ren via lttng-dev
2021-07-07 13:46 ` Mathieu Desnoyers via lttng-dev

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).