From: "wuqiang.matt" <wuqiang.matt@bytedance.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: linux-trace-kernel@vger.kernel.org, mhiramat@kernel.org,
davem@davemloft.net, anil.s.keshavamurthy@intel.com,
naveen.n.rao@linux.ibm.com, rostedt@goodmis.org,
peterz@infradead.org, akpm@linux-foundation.org,
sander@svanheule.net, ebiggers@google.com,
dan.j.williams@intel.com, jpoimboe@kernel.org,
linux-kernel@vger.kernel.org, lkp@intel.com, mattwu@163.com
Subject: Re: [PATCH v1] lib,kprobes: using try_cmpxchg_local in objpool_push
Date: Mon, 30 Oct 2023 09:57:03 +0800 [thread overview]
Message-ID: <59bf8835-6d07-4336-aa95-d39928dd43ab@bytedance.com> (raw)
In-Reply-To: <b579d68f-f2ec-42ef-8366-6878c9930e0c@roeck-us.net>
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_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@bytedance.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'
This patch was already reverted from probes/for-next by Masami Hiramatsu.
Then we will rework it after the arch_cmpxchg_local issue is resolved.
> 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.
We are working on it and the fix is in discussion.
> Guenter
Regards,
wuqiang
prev parent reply other threads:[~2023-10-30 1:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-23 11:24 wuqiang.matt
2023-10-23 15:43 ` Steven Rostedt
2023-10-24 1:01 ` Masami Hiramatsu
2023-10-24 1:57 ` wuqiang.matt
2023-10-24 11:03 ` Masami Hiramatsu
2023-10-24 0:56 ` Masami Hiramatsu
2023-10-29 17:05 ` Guenter Roeck
2023-10-30 1:57 ` wuqiang.matt [this message]
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=59bf8835-6d07-4336-aa95-d39928dd43ab@bytedance.com \
--to=wuqiang.matt@bytedance.com \
--cc=akpm@linux-foundation.org \
--cc=anil.s.keshavamurthy@intel.com \
--cc=dan.j.williams@intel.com \
--cc=davem@davemloft.net \
--cc=ebiggers@google.com \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=lkp@intel.com \
--cc=mattwu@163.com \
--cc=mhiramat@kernel.org \
--cc=naveen.n.rao@linux.ibm.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=sander@svanheule.net \
/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
all inboxes | Powered by JetHome®