Move the huge page size defines into arch code
authorJens Axboe <jens.axboe@oracle.com>
Fri, 23 Mar 2007 07:23:30 +0000 (08:23 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Fri, 23 Mar 2007 07:23:30 +0000 (08:23 +0100)
It's 2MB on x86-64 by default, and 4MB on x86.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
arch-x86.h
arch-x86_64.h
os.h

index d14936cda5f1bfde9c8b66334333edcbe946ef2f..aa106920aeaf5cae6a1159d64bb9818196be3be5 100644 (file)
@@ -25,6 +25,8 @@
 #define __NR_async_thread      323
 #endif
 
+#define        FIO_HUGE_PAGE           4194304
+
 #define FIO_HAVE_SYSLET
 
 #define nop    __asm__ __volatile__("rep;nop": : :"memory")
index d53c9a22aef24a328f70a04cac005d6dcc790547..4e0ad5f6e36ab0dcc3e1c37a461a65470a42a3dd 100644 (file)
@@ -25,6 +25,8 @@
 #define __NR_async_thread      283
 #endif
 
+#define        FIO_HUGE_PAGE           2097152
+
 #define FIO_HAVE_SYSLET
 
 #define nop    __asm__ __volatile__("rep;nop": : :"memory")
diff --git a/os.h b/os.h
index 85db5b8e47a07a1376e0baaa373bc82f1f70a0ed..3f83905d5b31f4adbf5a7f1c74db8b2a444049ef 100644 (file)
--- a/os.h
+++ b/os.h
 #define SHM_HUGETLB                    0
 #define FIO_HUGE_PAGE                  0
 #else
+#ifndef FIO_HUGE_PAGE
 #define FIO_HUGE_PAGE                  4194304
 #endif
+#endif
 
 #if __GNUC__ < 3
 #define __must_check