[rds-commits] zab commits r127 - trunk/linux/net/rds
svn-commits@oss.oracle.com
svn-commits at oss.oracle.com
Wed Jul 5 19:08:53 CDT 2006
Author: zab
Date: 2006-07-05 19:08:52 -0500 (Wed, 05 Jul 2006)
New Revision: 127
Modified:
trunk/linux/net/rds/flow.c
Log:
Don't use read_lock_bh() to wake the RDS socket as messaages are dropped from
the flow. Instead we use more conservative but suboptimal irqsave locking.
Modified: trunk/linux/net/rds/flow.c
===================================================================
--- trunk/linux/net/rds/flow.c 2006-07-05 22:40:23 UTC (rev 126)
+++ trunk/linux/net/rds/flow.c 2006-07-06 00:08:52 UTC (rev 127)
@@ -225,12 +225,18 @@
spin_unlock_irqrestore(&flow->f_conn->c_lock, flags);
if (wake) {
- /* careful not to race with rds_release -> sock_orphan */
+ /*
+ * Careful not to race with rds_release -> sock_orphan which
+ * clears sk_sleep. _bh() isn't OK here, we're called
+ * from interrupt handlers. It's probably OK to wake the
+ * waitqueue after sk_sleep is clear as we hold a flow ref
+ * which holds a sock ref, but this seems more conservative.
+ */
struct sock *sk = rds_rs_to_sk(flow->f_rs);
- read_lock_bh(&sk->sk_callback_lock);
+ read_lock_irqsave(&sk->sk_callback_lock, flags);
if (!sock_flag(sk, SOCK_DEAD))
wake_up(sk->sk_sleep);
- read_unlock_bh(&sk->sk_callback_lock);
+ read_unlock_irqrestore(&sk->sk_callback_lock, flags);
}
}
More information about the rds-commits
mailing list