[Ocfs2-commits] zab commits r2560 - trunk/fs/ocfs2/cluster

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Tue Sep 6 15:50:29 CDT 2005


Author: zab
Signed-off-by: jlbec
Date: 2005-09-06 15:50:28 -0500 (Tue, 06 Sep 2005)
New Revision: 2560

Modified:
   trunk/fs/ocfs2/cluster/tcp.c
Log:
o Set sk_allocation and use non-waiting gfp masks in other fs messaging.  At
  some point in the past we lost the setting of sk_allocation so fs messages,
  including keep alives, were blocking under memory pressure.

Signed-off-by: jlbec


Modified: trunk/fs/ocfs2/cluster/tcp.c
===================================================================
--- trunk/fs/ocfs2/cluster/tcp.c	2005-09-01 01:12:43 UTC (rev 2559)
+++ trunk/fs/ocfs2/cluster/tcp.c	2005-09-06 20:50:28 UTC (rev 2560)
@@ -178,7 +178,7 @@
 	int ret = 0;
 
 	do {
-		if (!idr_pre_get(&nn->nn_status_idr, GFP_NOFS)) {
+		if (!idr_pre_get(&nn->nn_status_idr, GFP_ATOMIC)) {
 			ret = -EAGAIN;
 			break;
 		}
@@ -687,7 +687,7 @@
 		goto out;
 	}
 
-       	nmh = kcalloc(1, sizeof(struct o2net_msg_handler), GFP_KERNEL);
+       	nmh = kcalloc(1, sizeof(struct o2net_msg_handler), GFP_NOFS);
 	if (nmh == NULL) {
 		ret = -ENOMEM;
 		goto out;
@@ -931,14 +931,14 @@
 	nst.st_sc = sc;
 
 	veclen = caller_veclen + 1;
-	vec = kmalloc(sizeof(struct kvec) * veclen, GFP_KERNEL);
+	vec = kmalloc(sizeof(struct kvec) * veclen, GFP_ATOMIC);
 	if (vec == NULL) {
 		mlog(0, "failed to %zu element kvec!\n", veclen);
 		ret = -ENOMEM;
 		goto out;
 	}
 
-	msg = kmalloc(sizeof(o2net_msg), GFP_KERNEL);
+	msg = kmalloc(sizeof(o2net_msg), GFP_ATOMIC);
 	if (!msg) {
 		mlog(0, "failed to allocate a o2net_msg!\n");
 		ret = -ENOMEM;
@@ -1382,6 +1382,8 @@
 	}
 	sc->sc_sock = sock; /* freed by sc_kref_release */
 
+	sock->sk->sk_allocation = GFP_ATOMIC;
+
 	myaddr.sin_family = AF_INET;
 	myaddr.sin_port = (__force u16)htons(0); /* any port */
 
@@ -1585,6 +1587,8 @@
 	if (ret < 0)
 		goto out;
 
+	new_sock->sk->sk_allocation = GFP_ATOMIC;
+
 	ret = o2net_set_nodelay(new_sock);
 	if (ret) {
 		mlog(ML_ERROR, "setting TCP_NODELAY failed with %d\n", ret);
@@ -1718,6 +1722,8 @@
 		goto out;
 	}
 
+	sock->sk->sk_allocation = GFP_ATOMIC;
+
 	write_lock_bh(&sock->sk->sk_callback_lock);
 	sock->sk->sk_user_data = sock->sk->sk_data_ready;
 	sock->sk->sk_data_ready = o2net_listen_data_ready;



More information about the Ocfs2-commits mailing list