public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: liqiang <liqiang64@huawei.com>
To: <wenjia@linux.ibm.com>, <jaka@linux.ibm.com>,
	<alibuda@linux.alibaba.com>, <tonylu@linux.alibaba.com>,
	<guwen@linux.alibaba.com>, <dust.li@linux.alibaba.com>
Cc: <linux-s390@vger.kernel.org>, <netdev@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <luanjianhai@huawei.com>,
	<zhangxuzhou4@huawei.com>, <dengguangxing@huawei.com>,
	<gaochao24@huawei.com>, <liqiang64@huawei.com>
Subject: [PATCH net-next 0/1] net/smc: Optimize rmbs/sndbufs lock
Date: Mon, 18 Nov 2024 21:21:46 +0800	[thread overview]
Message-ID: <20241118132147.1614-1-liqiang64@huawei.com> (raw)

This patch changes the global lock used by the buf_desc linked list
array in the smc link group to a smaller granularity, which can
reduce competition between links using different bufsizes and make
them perform better.

After applying this patch, the main scenarios that generate benefits
are as follows: multiple threads use different socket buffers
(sk->sk_sndbuf/sk_rcvbuf) to establish connections concurrently.

I constructed the above scenario and compared the performance of
socket buffer distribution in 4 sizes when multi-threaded in
parallel (tested using nginx/wrk):

On server:
smc_run nginx

On client:
smc_run wrk -t <2~128> -c 200 -H "Connection: close" http://127.0.0.1

+-------------------+--------+--------+--------+--------+--------+~
|conns/qps          |  -t 2  | -t 4   | -t 8   | -t 16  | -t 32  |
+-------------------+--------+--------+--------+--------+--------+~
|loopback-ism origin|6824.01 |9011.71 |11571.07|12179.72|11576.88|
+-------------------+--------+--------+--------+--------+--------+~
|loopback-ism after |7280.63 |9508.53 |13173.27|16368.93|14664.51|
+-------------------+--------+--------+--------+--------+--------+~

~--------+--------+
  -t 64  | -t 128 |
~--------+--------+
 11080.98|11909.36|
~--------+--------+
 14664.51|13112.89|
~--------+--------+

Test environment:
QEMU emulator version 1.5.3 @ Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz

liqiang (1):
  Separate locks for rmbs/sndbufs linked lists of different lengths

 net/smc/smc_core.c | 66 +++++++++++++++++++-------------------
 net/smc/smc_core.h |  9 +++---
 net/smc/smc_llc.c  | 79 +++++++++++++++++++++++++++++++++++++---------
 3 files changed, 103 insertions(+), 51 deletions(-)

-- 
2.43.0


             reply	other threads:[~2024-11-18 13:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-18 13:21 liqiang [this message]
2024-11-18 13:21 ` [PATCH net-next 1/1] Separate locks for rmbs/sndbufs linked lists of different lengths liqiang
2024-11-18 20:48   ` Kuniyuki Iwashima
2024-11-19  8:13     ` Li Qiang

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=20241118132147.1614-1-liqiang64@huawei.com \
    --to=liqiang64@huawei.com \
    --cc=alibuda@linux.alibaba.com \
    --cc=dengguangxing@huawei.com \
    --cc=dust.li@linux.alibaba.com \
    --cc=gaochao24@huawei.com \
    --cc=guwen@linux.alibaba.com \
    --cc=jaka@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=luanjianhai@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=tonylu@linux.alibaba.com \
    --cc=wenjia@linux.ibm.com \
    --cc=zhangxuzhou4@huawei.com \
    /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