You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2024/09/13 01:10:11 UTC
(nuttx) branch master updated: fs/mmap: Add MADV_HUGEPAGE definitions
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 53c7612faf fs/mmap: Add MADV_HUGEPAGE definitions
53c7612faf is described below
commit 53c7612faf9945ec97eb991017a5ebbb0c1231d0
Author: ouyangxiangzhen <ou...@xiaomi.com>
AuthorDate: Mon Jun 3 10:02:19 2024 +0800
fs/mmap: Add MADV_HUGEPAGE definitions
This commit add MADV_HUGEPAGE and MADV_NOHUGEPAGE definitions for madvise. Notice that none of these flags have been implemented yet.
Signed-off-by: ouyangxiangzhen <ou...@xiaomi.com>
---
include/sys/mman.h | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/include/sys/mman.h b/include/sys/mman.h
index d5b3c0393e..e3fae5f920 100644
--- a/include/sys/mman.h
+++ b/include/sys/mman.h
@@ -114,6 +114,17 @@
#define MADV_WILLNEED POSIX_MADV_WILLNEED
#define MADV_DONTNEED POSIX_MADV_DONTNEED
+/* The following flags are defined since Linux 2.6.38.
+ * None of these flags have been implemented yet.
+ * MADV_HUGEPAGE
+ * Enable Transparent Huge Pages (THP) for pages.
+ * MADV_NOHUGEPAGE
+ * Ensure the pages will not be backed by transparent hugepages.
+ */
+
+#define MADV_HUGEPAGE (14)
+#define MADV_NOHUGEPAGE (15)
+
/* The following flags are defined for posix_typed_mem_open():
*
* POSIX_TYPED_MEM_ALLOCATE