Skip to content

Commit 2e13bde

Browse files
Tony Ludavem330
authored andcommitted
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 <[email protected]> Signed-off-by: Tony Lu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 806c37d commit 2e13bde

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

net/smc/smc_tx.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,10 @@ int smc_tx_sndbuf_nonempty(struct smc_connection *conn)
611611
return rc;
612612
}
613613

614+
/* Wakeup sndbuf consumers from process context
615+
* since there is more data to transmit. The caller
616+
* must hold sock lock.
617+
*/
614618
void smc_tx_pending(struct smc_connection *conn)
615619
{
616620
struct smc_sock *smc = container_of(conn, struct smc_sock, conn);
@@ -626,7 +630,8 @@ void smc_tx_pending(struct smc_connection *conn)
626630
}
627631

628632
/* Wakeup sndbuf consumers from process context
629-
* since there is more data to transmit
633+
* since there is more data to transmit in locked
634+
* sock.
630635
*/
631636
void smc_tx_work(struct work_struct *work)
632637
{

0 commit comments

Comments
 (0)