[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89i+dYsvrVwWCRX=B1ZyL3nZUjnNtaQ5rfizDOV5XhHV2dQ@mail.gmail.com>
Date: Tue, 23 Jul 2024 16:57:19 +0200
From: Eric Dumazet <edumazet@...gle.com>
To: Jason Xing <kerneljasonxing@...il.com>
Cc: davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com, horms@...nel.org,
netdev@...r.kernel.org, Jason Xing <kernelxing@...cent.com>
Subject: Re: [RFC PATCH net-next] net: add an entry for CONFIG_NET_RX_BUSY_POLL
On Tue, Jul 23, 2024 at 3:57 PM Jason Xing <kerneljasonxing@...il.com> wrote:
>
> From: Jason Xing <kernelxing@...cent.com>
>
> When I was doing performance test on unix_poll(), I found out that
> accessing sk->sk_ll_usec when calling sock_poll()->sk_can_busy_loop()
> occupies too much time, which causes around 16% degradation. So I
> decided to turn off this config, which cannot be done apparently
> before this patch.
Too many CONFIG_ options, distros will enable it anyway.
In my builds, offset of sk_ll_usec is 0xe8.
Are you using some debug options or an old tree ?
I can not understand how a 16% degradation can occur, reading a field
in a cache line which contains read mostly fields for af_unix socket.
I think you need to provide more details / analysis, and perhaps come
to a different conclusion.
>
> Signed-off-by: Jason Xing <kernelxing@...cent.com>
> ---
> More data not much related if you're interested:
> 5.82 │ mov 0x18(%r13),%rdx
> 0.03 │ mov %rsi,%r12
> 1.76 │ mov %rdi,%rbx
> │ sk_can_busy_loop():
> 0.50 │ mov 0x104(%rdx),%r14d
> 41.30 │ test %r14d,%r14d
> Note: I run 'perf record -e L1-dcache-load-misses' to diagnose
> ---
> net/Kconfig | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/net/Kconfig b/net/Kconfig
> index d27d0deac0bf..1f1b793984fe 100644
> --- a/net/Kconfig
> +++ b/net/Kconfig
> @@ -335,8 +335,10 @@ config CGROUP_NET_CLASSID
> being used in cls_cgroup and for netfilter matching.
>
> config NET_RX_BUSY_POLL
> - bool
> + bool "Low latency busy poll timeout"
> default y if !PREEMPT_RT || (PREEMPT_RT && !NETCONSOLE)
> + help
> + Approximate time in us to spin waiting for packets on the device queue.
Wrong comment. It is a y/n choice, no 'usec' at this stage.
>
> config BQL
> bool
> --
> 2.37.3
>
Powered by blists - more mailing lists