Currently ALIGN_UP pushes segment boundaries one hugepage too far
which causes slice tests to fail when mapping read-only segments
of a binary in huge pages.

From: Mel Gorman <m...@csn.ul.ie>
Signed-off-by: Eric B Munson <ebmun...@us.ibm.com>
---
Changes from V1:
ALIGN_UP now calls the ALIGN macro instead of using the same definition

 libhugetlbfs_internal.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libhugetlbfs_internal.h b/libhugetlbfs_internal.h
index da32f84..8b1709c 100644
--- a/libhugetlbfs_internal.h
+++ b/libhugetlbfs_internal.h
@@ -45,7 +45,7 @@
 #define stringify(x)   stringify_1(x)
 
 #define ALIGN(x, a)    (((x) + (a) - 1) & ~((a) - 1))
-#define ALIGN_UP(x,a)  (((x) + (a)) & ~((a) - 1))
+#define ALIGN_UP(x,a)  ALIGN(x,a)
 #define ALIGN_DOWN(x,a) ((x) & ~((a) - 1))
 
 #if defined(__powerpc64__) || defined (__powerpc__)
-- 
1.6.3.3


------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Libhugetlbfs-devel mailing list
Libhugetlbfs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel

Reply via email to