From: Tony Lu <tonylu@linux.alibaba.com>
To: raspl@linux.ibm.com
Cc: kgraul@linux.ibm.com, kuba@kernel.org, davem@davemloft.net,
netdev@vger.kernel.org, linux-s390@vger.kernel.org
Subject: [PATCH net-next] net/smc: Add comment for smc_tx_pending
Date: Fri, 11 Feb 2022 14:52:21 +0800 [thread overview]
Message-ID: <20220211065220.88196-1-tonylu@linux.alibaba.com> (raw)
In-Reply-To: <74aaa8ce-81a4-b048-cee2-b137279d13d5@linux.ibm.com>
The previous patch introduces a lock-free version of smc_tx_work() to
solve unnecessary lock contention, which is expected to be held lock.
So this adds comment to remind people to keep an eye out for locks.
Suggested-by: Stefan Raspl <raspl@linux.ibm.com>
Signed-off-by: Tony Lu <tonylu@linux.alibaba.com>
---
net/smc/smc_tx.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/net/smc/smc_tx.c b/net/smc/smc_tx.c
index a96ce162825e..5df3940d4543 100644
--- a/net/smc/smc_tx.c
+++ b/net/smc/smc_tx.c
@@ -611,6 +611,10 @@ int smc_tx_sndbuf_nonempty(struct smc_connection *conn)
return rc;
}
+/* Wakeup sndbuf consumers from process context
+ * since there is more data to transmit. The caller
+ * must hold sock lock.
+ */
void smc_tx_pending(struct smc_connection *conn)
{
struct smc_sock *smc = container_of(conn, struct smc_sock, conn);
@@ -626,7 +630,8 @@ void smc_tx_pending(struct smc_connection *conn)
}
/* Wakeup sndbuf consumers from process context
- * since there is more data to transmit
+ * since there is more data to transmit in locked
+ * sock.
*/
void smc_tx_work(struct work_struct *work)
{
--
2.32.0.3.g01195cf9f
next prev parent reply other threads:[~2022-02-11 9:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-30 18:02 [PATCH net-next 0/3] net/smc: Improvements for TCP_CORK and sendfile() Tony Lu
2022-01-30 18:02 ` [PATCH net-next 1/3] net/smc: Send directly when TCP_CORK is cleared Tony Lu
2022-01-31 19:13 ` Stefan Raspl
2022-02-07 10:03 ` Tony Lu
2022-02-11 6:52 ` Tony Lu [this message]
2022-02-14 11:20 ` [PATCH net-next] net/smc: Add comment for smc_tx_pending patchwork-bot+netdevbpf
2022-01-30 18:02 ` [PATCH net-next 2/3] net/smc: Remove corked dealyed work Tony Lu
2022-01-31 19:40 ` Stefan Raspl
2022-02-11 9:10 ` Tony Lu
2022-02-14 10:29 ` Stefan Raspl
2022-02-14 12:10 ` Tony Lu
2022-01-30 18:02 ` [PATCH net-next 3/3] net/smc: Cork when sendpage with MSG_SENDPAGE_NOTLAST flag Tony Lu
2022-01-31 19:46 ` Stefan Raspl
2022-01-31 19:42 ` [PATCH net-next 0/3] net/smc: Improvements for TCP_CORK and sendfile() Jakub Kicinski
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=20220211065220.88196-1-tonylu@linux.alibaba.com \
--to=tonylu@linux.alibaba.com \
--cc=davem@davemloft.net \
--cc=kgraul@linux.ibm.com \
--cc=kuba@kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=raspl@linux.ibm.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