Re: [PATCH v1] lib,kprobes: using try_cmpxchg_local in objpool_push

2023-10-29 Thread wuqiang.matt
On 2023/10/30 01:05, Guenter Roeck wrote: On Mon, Oct 23, 2023 at 07:24:52PM +0800, wuqiang.matt wrote: The objpool_push can only happen on local cpu node, so only the local cpu can touch slot->tail and slot->last, which ensures the correctness of using cmpxchg without lock prefix (using try_cmp

Re: [PATCH v1] lib,kprobes: using try_cmpxchg_local in objpool_push

2023-10-29 Thread Guenter Roeck
On Mon, Oct 23, 2023 at 07:24:52PM +0800, wuqiang.matt wrote: > The objpool_push can only happen on local cpu node, so only the local > cpu can touch slot->tail and slot->last, which ensures the correctness > of using cmpxchg without lock prefix (using try_cmpxchg_local instead > of try_cmpxchg_acq

Re: [PATCH v1] lib,kprobes: using try_cmpxchg_local in objpool_push

2023-10-24 Thread Google
On Tue, 24 Oct 2023 09:57:17 +0800 "wuqiang.matt" wrote: > On 2023/10/24 09:01, Masami Hiramatsu (Google) wrote: > > On Mon, 23 Oct 2023 11:43:04 -0400 > > Steven Rostedt wrote: > > > >> On Mon, 23 Oct 2023 19:24:52 +0800 > >> "wuqiang.matt" wrote: > >> > >>> The objpool_push can only happen o

Re: [PATCH v1] lib,kprobes: using try_cmpxchg_local in objpool_push

2023-10-23 Thread wuqiang.matt
On 2023/10/24 09:01, Masami Hiramatsu (Google) wrote: On Mon, 23 Oct 2023 11:43:04 -0400 Steven Rostedt wrote: On Mon, 23 Oct 2023 19:24:52 +0800 "wuqiang.matt" wrote: The objpool_push can only happen on local cpu node, so only the local cpu can touch slot->tail and slot->last, which ensure

Re: [PATCH v1] lib,kprobes: using try_cmpxchg_local in objpool_push

2023-10-23 Thread Google
On Mon, 23 Oct 2023 11:43:04 -0400 Steven Rostedt wrote: > On Mon, 23 Oct 2023 19:24:52 +0800 > "wuqiang.matt" wrote: > > > The objpool_push can only happen on local cpu node, so only the local > > cpu can touch slot->tail and slot->last, which ensures the correctness > > of using cmpxchg witho

Re: [PATCH v1] lib,kprobes: using try_cmpxchg_local in objpool_push

2023-10-23 Thread Google
On Mon, 23 Oct 2023 19:24:52 +0800 "wuqiang.matt" wrote: > The objpool_push can only happen on local cpu node, so only the local > cpu can touch slot->tail and slot->last, which ensures the correctness > of using cmpxchg without lock prefix (using try_cmpxchg_local instead > of try_cmpxchg_acquir

Re: [PATCH v1] lib,kprobes: using try_cmpxchg_local in objpool_push

2023-10-23 Thread Steven Rostedt
On Mon, 23 Oct 2023 19:24:52 +0800 "wuqiang.matt" wrote: > The objpool_push can only happen on local cpu node, so only the local > cpu can touch slot->tail and slot->last, which ensures the correctness > of using cmpxchg without lock prefix (using try_cmpxchg_local instead > of try_cmpxchg_acquir

[PATCH v1] lib,kprobes: using try_cmpxchg_local in objpool_push

2023-10-23 Thread wuqiang.matt
The objpool_push can only happen on local cpu node, so only the local cpu can touch slot->tail and slot->last, which ensures the correctness of using cmpxchg without lock prefix (using try_cmpxchg_local instead of try_cmpxchg_acquire). Testing with IACA found the lock version of pop/push pair cost