Commit 2e13bde1 authored by Tony Lu's avatar Tony Lu Committed by David S. Miller

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: default avatarStefan Raspl <raspl@linux.ibm.com>
Signed-off-by: default avatarTony Lu <tonylu@linux.alibaba.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 806c37dd
...@@ -611,6 +611,10 @@ int smc_tx_sndbuf_nonempty(struct smc_connection *conn) ...@@ -611,6 +611,10 @@ int smc_tx_sndbuf_nonempty(struct smc_connection *conn)
return rc; 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) void smc_tx_pending(struct smc_connection *conn)
{ {
struct smc_sock *smc = container_of(conn, struct smc_sock, conn); struct smc_sock *smc = container_of(conn, struct smc_sock, conn);
...@@ -626,7 +630,8 @@ void smc_tx_pending(struct smc_connection *conn) ...@@ -626,7 +630,8 @@ void smc_tx_pending(struct smc_connection *conn)
} }
/* Wakeup sndbuf consumers from process context /* 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) void smc_tx_work(struct work_struct *work)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment