[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b579d68f-f2ec-42ef-8366-6878c9930e0c@roeck-us.net>
Date: Sun, 29 Oct 2023 10:05:39 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: "wuqiang.matt" <wuqiang.matt@...edance.com>
Cc: linux-trace-kernel@...r.kernel.org, mhiramat@...nel.org,
davem@...emloft.net, anil.s.keshavamurthy@...el.com,
naveen.n.rao@...ux.ibm.com, rostedt@...dmis.org,
peterz@...radead.org, akpm@...ux-foundation.org,
sander@...nheule.net, ebiggers@...gle.com,
dan.j.williams@...el.com, jpoimboe@...nel.org,
linux-kernel@...r.kernel.org, lkp@...el.com, mattwu@....com
Subject: Re: [PATCH v1] lib,kprobes: using try_cmpxchg_local in objpool_push
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_acquire).
>
> Testing with IACA found the lock version of pop/push pair costs 16.46
> cycles and local-push version costs 15.63 cycles. Kretprobe throughput
> is improved to 1.019 times of the lock version for x86_64 systems.
>
> OS: Debian 10 X86_64, Linux 6.6rc6 with freelist
> HW: XEON 8336C x 2, 64 cores/128 threads, DDR4 3200MT/s
>
> 1T 2T 4T 8T 16T
> lock: 29909085 59865637 119692073 239750369 478005250
> local: 30297523 60532376 121147338 242598499 484620355
> 32T 48T 64T 96T 128T
> lock: 957553042 1435814086 1680872925 2043126796 2165424198
> local: 968526317 1454991286 1861053557 2059530343 2171732306
>
> Signed-off-by: wuqiang.matt <wuqiang.matt@...edance.com>
This patch results in
lib/objpool.c:169:12: error: implicit declaration of function 'arch_cmpxchg_local' is invalid in C99
or
lib/objpool.c: In function 'objpool_try_add_slot':
include/linux/atomic/atomic-arch-fallback.h:384:27: error: implicit declaration of function 'arch_cmpxchg_local'
for various architectures (I have seen it with arc, hexagon, and openrisc
so far).
As usual, my apologies for the noise if this has already been reported
and/or fixed.
Guenter
Powered by blists - more mailing lists