Thread (16 messages) read the whole thread 16 messages, 5 authors, 2025-10-29

Re: [PATCH v1 2/2] epoll: Use __user_write_access_begin() and unsafe_put_user() in epoll_put_uevent().

From: David Laight <hidden>
Date: 2025-10-28 09:54:11
Also in: linux-arm-kernel, linux-riscv, lkml

On Tue, 28 Oct 2025 05:32:13 +0000
Kuniyuki Iwashima [off-list ref] wrote:

....
I rebased on 19ab0a22efbd and tested 4 versions on
AMD EPYC 7B12 machine:
That is zen5 which I believe has much faster clac/stac than anything else.
(It might also have a faster lfence - not sure.)

Getting a 3% change for that diff also seems unlikely.
Even if you halved the execution time of that code the system would have
to be spending 6% of the time in that loop.
Even your original post only shows 1% in ep_try_send_events().

An 'interesting' test is to replicate the code you are optimising
to see how much slower it goes - you can't gain more than the slowdown.

What is more likely is that breathing on the code changes the cache
line layout and that causes a larger performance change.

A better test for epoll_put_event would be to create 1000 fd (pipes or events).
Then time calls epoll_wait() that return lots of events.

	David
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help