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 <ouyangxiangzhen@xiaomi.com>
This commit is contained in:
ouyangxiangzhen 2024-06-03 10:02:19 +08:00 committed by Xiang Xiao
parent d8d7f3c38e
commit 53c7612faf
1 changed files with 11 additions and 0 deletions

View File

@ -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