From cb25df61fbe19065b41bee131d19335d615c676b Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Fri, 23 Mar 2007 08:23:30 +0100 Subject: [PATCH] Move the huge page size defines into arch code It's 2MB on x86-64 by default, and 4MB on x86. Signed-off-by: Jens Axboe --- arch-x86.h | 2 ++ arch-x86_64.h | 2 ++ os.h | 2 ++ 3 files changed, 6 insertions(+) diff --git a/arch-x86.h b/arch-x86.h index d14936cd..aa106920 100644 --- a/arch-x86.h +++ b/arch-x86.h @@ -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") diff --git a/arch-x86_64.h b/arch-x86_64.h index d53c9a22..4e0ad5f6 100644 --- a/arch-x86_64.h +++ b/arch-x86_64.h @@ -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 85db5b8e..3f83905d 100644 --- a/os.h +++ b/os.h @@ -51,8 +51,10 @@ #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 -- 2.25.1