[SSI] openssi/kernel/cluster/ssi/util rmtfb.c,1.35,1.36
Roger Tsang <[email protected]> Tue, 25 Jan 2011 05:52:28 +0000
| Newsgroups | gmane.linux.cluster.ssic.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/util
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv23124/cluster/ssi/util
Modified Files:
Tag: OPENSSI-FC
rmtfb.c
Log Message:
rmtfb_newcli: call rmtfb_remote_tty_ino() and update fields in file structure outside critical section. reduce rmtfb_newcli_lock contention. (#ifdef RMTFB_HASH_LOCKLESS)
Index: rmtfb.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/util/rmtfb.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- rmtfb.c 17 Jan 2011 07:05:45 -0000 1.35
+++ rmtfb.c 25 Jan 2011 05:52:26 -0000 1.36
@@ -1454,6 +1454,7 @@
hash = rfbhash(id);
down(&rmtfb_newcli_lock);
+
if (import) {
/* Make sure another import didn't make one already */
old = __rmtfb_getcli_id(id, &rmtfb_newcli_lock);
@@ -1471,21 +1472,6 @@
goto out;
}
}
-
-#ifdef REOP_EXPORT_PATH_SVRNODE
- if (!noremote)
- rmtfb_remote_tty_ino(file, svr);
-#endif
- /* SSI: overrides struct socket->file->f_op */
- file->f_op = &ssidev_remote_fops;
-
- file->private_data = rfb;
- rmtfb_get(rfb);
-
- /* Skipped get_file(file) due to circular reference.
- * file->private_data->common.rfb_file == file
- */
-
spin_lock(&rmtfb_clitbl_lock);
hlist_add_head_rcu(&rfb->common.rfb_hash, &rmtfb_clitbl[hash]);
spin_unlock(&rmtfb_clitbl_lock);
@@ -1493,9 +1479,8 @@
if (!noremote) {
/* We save this part for last to ensure there is no other
- * rmtfb_cli struct with the same rfb_id. We avoid racing with
- * rmtfb_rclose(). If we won the race the next rmtfb_rclose()
- * could see -ERFB_TRYAGAIN from the server.
+ * rmtfb_cli struct with the same rfb_id. By doing so we
+ * avoid racing with rmtfb_rclose().
*/
if (import) {
error = rmtfb_setcli_reopen(rfb);
@@ -1508,7 +1493,14 @@
rmtfb_putcli(rfb);
goto out_bad;
}
+#ifdef REOP_EXPORT_PATH_SVRNODE
+ rmtfb_remote_tty_ino(file, svr);
+#endif
}
+ file->f_op = &ssidev_remote_fops; /* overrides socket->file->f_op */
+ file->private_data = rfb;
+ rmtfb_get(rfb);
+
atomic_set(&rfb->rfb_state, 1); /* ready */
wake_up(&rfb->rfb_wait);
out:
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d