summaryrefslogtreecommitdiff
path: root/net/smc
diff options
context:
space:
mode:
authorTony Lu <tonylu@linux.alibaba.com>2022-02-11 09:52:21 +0300
committerDavid S. Miller <davem@davemloft.net>2022-02-14 14:16:40 +0300
commit2e13bde1315373cf7e9fb7dc4330d0d2a6bd5417 (patch)
tree273eaad0b608c23b84a258081a11dd82602ed584 /net/smc
parent806c37ddcf286665adce5c3a99b5fe4424cbf9fe (diff)
downloadlinux-2e13bde1315373cf7e9fb7dc4330d0d2a6bd5417.tar.xz
net/smc: Add comment for smc_tx_pending
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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc')
-rw-r--r--net/smc/smc_tx.c7
1 files changed, 6 insertions, 1 deletions
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)
{