Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Nov 2011 14:51:27 +0000 (UTC)
From:      Attilio Rao <attilio@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r227754 - user/attilio/vmcontention/sys/vm
Message-ID:  <201111201451.pAKEpRkW096961@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: attilio
Date: Sun Nov 20 14:51:27 2011
New Revision: 227754
URL: http://svn.freebsd.org/changeset/base/227754

Log:
  Add more KTR points for failure in vm_radix_insert().

Modified:
  user/attilio/vmcontention/sys/vm/vm_radix.c

Modified: user/attilio/vmcontention/sys/vm/vm_radix.c
==============================================================================
--- user/attilio/vmcontention/sys/vm/vm_radix.c	Sun Nov 20 14:45:42 2011	(r227753)
+++ user/attilio/vmcontention/sys/vm/vm_radix.c	Sun Nov 20 14:51:27 2011	(r227754)
@@ -288,8 +288,12 @@ vm_radix_insert(struct vm_radix *rtree, 
 		 */
 		if (root == NULL || root->rn_count != 0) {
 			rnode = vm_radix_node_get();
-			if (rnode == NULL)
+			if (rnode == NULL) {
+				CTR4(KTR_VM,
+"insert: tree %p, root %p, index: %d, level: %d failed to allocate a new node",
+				    rtree, root, index, level);
 				return (ENOMEM);
+			}
 			/*
 			 * Store the new pointer with a memory barrier so
 			 * that it is visible before the new root.
@@ -311,8 +315,13 @@ vm_radix_insert(struct vm_radix *rtree, 
 		/* Add the required intermidiate nodes. */
 		if (rnode->rn_child[slot] == NULL) {
 			rnode->rn_child[slot] = vm_radix_node_get();
-    			if (rnode->rn_child[slot] == NULL)
+    			if (rnode->rn_child[slot] == NULL) {
+				CTR5(KTR_VM,
+"insert: tree %p, index %jd, level %d, slot %d, child %p failed to populate",
+		    		    rtree, index, level, slot,
+				    rnode->rn_child[slot]);
 		    		return (ENOMEM);
+			}
 			rnode->rn_count++;
 	    	}
 		CTR5(KTR_VM,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111201451.pAKEpRkW096961>