94084c
commit 4ed990e5b97a61f29f929bdeb36c5b2abb547a64
94084c
Author: Joseph Myers <joseph@codesourcery.com>
94084c
Date:   Tue Sep 14 14:19:24 2021 +0000
94084c
94084c
    Add MADV_POPULATE_READ and MADV_POPULATE_WRITE from Linux 5.14 to bits/mman-linux.h
94084c
    
94084c
    Linux 5.14 adds constants MADV_POPULATE_READ and MADV_POPULATE_WRITE
94084c
    (with the same values on all architectures).  Add these to glibc's
94084c
    bits/mman-linux.h.
94084c
    
94084c
    Tested for x86_64.
94084c
    
94084c
    (cherry picked from commit 3561106278cddd2f007bd27fd4c3e90caaf14b43)
94084c
94084c
diff --git a/sysdeps/unix/sysv/linux/bits/mman-linux.h b/sysdeps/unix/sysv/linux/bits/mman-linux.h
94084c
index 3b1ae418e073c122..31451c28d93f9f72 100644
94084c
--- a/sysdeps/unix/sysv/linux/bits/mman-linux.h
94084c
+++ b/sysdeps/unix/sysv/linux/bits/mman-linux.h
94084c
@@ -89,6 +89,10 @@
94084c
 # define MADV_KEEPONFORK  19	/* Undo MADV_WIPEONFORK.  */
94084c
 # define MADV_COLD        20	/* Deactivate these pages.  */
94084c
 # define MADV_PAGEOUT     21	/* Reclaim these pages.  */
94084c
+# define MADV_POPULATE_READ 22	/* Populate (prefault) page tables
94084c
+				   readable.  */
94084c
+# define MADV_POPULATE_WRITE 23	/* Populate (prefault) page tables
94084c
+				   writable.  */
94084c
 # define MADV_HWPOISON	  100	/* Poison a page for testing.  */
94084c
 #endif
94084c