[PATCH v3] ring-buffer: Remove 32bit timestamp logic

2023-12-19 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Each event has a 27 bit timestamp delta that is used to hold the delta from the last event. If the time between events is greater than 2^27, then a timestamp is added that holds a 59 bit absolute timestamp. Until a389d86f7fd09 ("ring-buffer: Have nested events

Re: [PATCH v3] ring-buffer: Remove 32bit timestamp logic

2023-12-14 Thread Steven Rostedt
On Thu, 14 Dec 2023 12:32:38 -0800 Linus Torvalds wrote: > On Thu, 14 Dec 2023 at 12:30, Linus Torvalds > wrote: > > > > Read my email. Don't do random x86-centric things. We have that > > > > #ifndef system_has_cmpxchg64 > > #define system_has_cmpxchg64() false > > #endif > > > >

Re: [PATCH v3] ring-buffer: Remove 32bit timestamp logic

2023-12-14 Thread Linus Torvalds
On Thu, 14 Dec 2023 at 12:30, Linus Torvalds wrote: > > Read my email. Don't do random x86-centric things. We have that > > #ifndef system_has_cmpxchg64 > #define system_has_cmpxchg64() false > #endif > > which should work. And again, by "should work" I mean that it would disable this

Re: [PATCH v3] ring-buffer: Remove 32bit timestamp logic

2023-12-14 Thread Linus Torvalds
On Thu, 14 Dec 2023 at 12:18, Steven Rostedt wrote: > > For this issue of the 64bit cmpxchg, is there any config that works for any > arch that do not have a safe 64-bit cmpxchg? At least for 486, is the > second half of the if condition reasonable? > > if (IS_ENABLED(CONFIG_X86_32) &&

Re: [PATCH v3] ring-buffer: Remove 32bit timestamp logic

2023-12-14 Thread Steven Rostedt
On Thu, 14 Dec 2023 15:19:11 -0500 Steven Rostedt wrote: > For this issue of the 64bit cmpxchg, is there any config that works for any > arch that do not have a safe 64-bit cmpxchg? At least for 486, is the > second half of the if condition reasonable? > > if (IS_ENABLED(CONFIG_X86_32) &&

Re: [PATCH v3] ring-buffer: Remove 32bit timestamp logic

2023-12-14 Thread Steven Rostedt
On Thu, 14 Dec 2023 11:46:55 -0800 Linus Torvalds wrote: > On Thu, 14 Dec 2023 at 09:53, Steven Rostedt wrote: > > > > + /* > > +* For architectures that can not do cmpxchg() in NMI, or require > > +* disabling interrupts to do 64-bit cmpxchg(), do not allow them > > +

Re: [PATCH v3] ring-buffer: Remove 32bit timestamp logic

2023-12-14 Thread Linus Torvalds
On Thu, 14 Dec 2023 at 09:53, Steven Rostedt wrote: > > + /* > +* For architectures that can not do cmpxchg() in NMI, or require > +* disabling interrupts to do 64-bit cmpxchg(), do not allow them > +* to record in NMI context. > +*/ > + if

[PATCH v3] ring-buffer: Remove 32bit timestamp logic

2023-12-14 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Each event has a 27 bit timestamp delta that is used to hold the delta from the last event. If the time between events is greater than 2^27, then a timestamp is added that holds a 59 bit absolute timestamp. Until a389d86f7fd09 ("ring-buffer: Have nested events