[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241025135645.GA1507976@kernel.org>
Date: Fri, 25 Oct 2024 14:56:45 +0100
From: Simon Horman <horms@...nel.org>
To: Wenjia Zhang <wenjia@...ux.ibm.com>
Cc: Wen Gu <guwen@...ux.alibaba.com>,
"D. Wythe" <alibuda@...ux.alibaba.com>,
Tony Lu <tonylu@...ux.alibaba.com>,
David Miller <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
netdev@...r.kernel.org, linux-s390@...r.kernel.org,
Heiko Carstens <hca@...ux.ibm.com>,
Jan Karcher <jaka@...ux.ibm.com>, Gerd Bayer <gbayer@...ux.ibm.com>,
Alexandra Winter <wintera@...ux.ibm.com>,
Halil Pasic <pasic@...ux.ibm.com>,
Nils Hoppmann <niho@...ux.ibm.com>,
Niklas Schnell <schnelle@...ux.ibm.com>,
Thorsten Winkler <twinkler@...ux.ibm.com>,
Karsten Graul <kgraul@...ux.ibm.com>,
Stefan Raspl <raspl@...ux.ibm.com>
Subject: Re: [PATCH net-next] net/smc: increase SMC_WR_BUF_CNT
On Fri, Oct 25, 2024 at 09:46:19AM +0200, Wenjia Zhang wrote:
> From: Halil Pasic <pasic@...ux.ibm.com>
>
> The current value of SMC_WR_BUF_CNT is 16 which leads to heavy
> contention on the wr_tx_wait workqueue of the SMC-R linkgroup and its
> spinlock when many connections are competing for the buffer. Currently
> up to 256 connections per linkgroup are supported.
>
> To make things worse when finally a buffer becomes available and
> smc_wr_tx_put_slot() signals the linkgroup's wr_tx_wait wq, because
> WQ_FLAG_EXCLUSIVE is not used all the waiters get woken up, most of the
> time a single one can proceed, and the rest is contending on the
> spinlock of the wq to go to sleep again.
>
> For some reason include/linux/wait.h does not offer a top level wrapper
> macro for wait_event with interruptible, exclusive and timeout. I did
> not spend too many cycles on thinking if that is even a combination that
> makes sense (on the quick I don't see why not) and conversely I
> refrained from making an attempt to accomplish the interruptible,
> exclusive and timeout combo by using the abstraction-wise lower
> level __wait_event interface.
>
> To alleviate the tx performance bottleneck and the CPU overhead due to
> the spinlock contention, let us increase SMC_WR_BUF_CNT to 256.
>
> Signed-off-by: Halil Pasic <pasic@...ux.ibm.com>
> Reported-by: Nils Hoppmann <niho@...ux.ibm.com>
> Reviewed-by: Wenjia Zhang <wenjia@...ux.ibm.com>
> Signed-off-by: Wenjia Zhang <wenjia@...ux.ibm.com>
Reviewed-by: Simon Horman <horms@...nel.org>
Powered by blists - more mailing lists