aboutsummaryrefslogtreecommitdiff
path: root/morecore.c
diff options
context:
space:
mode:
authoraglitke <aglitke@aglitke.localdomain>2006-06-06 14:36:50 -0500
committeraglitke <aglitke@aglitke.localdomain>2006-06-06 14:36:50 -0500
commitf31fda38c96d51cf65a5c2be416950fe14a3fd96 (patch)
treed5f7a0fc213fd368ca8fe862325d73abb04aae83 /morecore.c
parentf456fa109edf2467ba8f5ea0444ac89c31c3c38c (diff)
downloadlibhugetlbfs-f31fda38c96d51cf65a5c2be416950fe14a3fd96.tar.gz
Revert mlock() reservation in hugetlbfs_morecore
Use of mlock is disabled because it results in bad numa behavior since the malloc'd memory is allocated node-local to the cpu calling morecore() and not to the cpu(s) that are actually using the memory. Signed-off-by: Adam Litke <agl@us.ibm.com>
Diffstat (limited to 'morecore.c')
-rw-r--r--morecore.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/morecore.c b/morecore.c
index ca4c71d..f7bb623 100644
--- a/morecore.c
+++ b/morecore.c
@@ -87,6 +87,11 @@ static void *hugetlbfs_morecore(ptrdiff_t increment)
return NULL;
}
+#if 0
+/* Use of mlock is disabled because it results in bad numa behavior since
+ * the malloc'd memory is allocated node-local to the cpu calling morecore()
+ * and not to the cpu(s) that are actually using the memory.
+ */
/* Use mlock to guarantee these pages to the process */
ret = mlock(p, newsize);
if (ret) {
@@ -95,6 +100,7 @@ static void *hugetlbfs_morecore(ptrdiff_t increment)
return NULL;
}
munlock(p, newsize);
+#endif
mapsize += newsize;
}