* Define MADV_COLD and MADV_PAGEOUT from Linux 5.4
@ 2019-11-27 23:45 Joseph Myers
2019-11-28 6:50 ` Florian Weimer
0 siblings, 1 reply; 2+ messages in thread
From: Joseph Myers @ 2019-11-27 23:45 UTC (permalink / raw
To: libc-alpha
Linux 5.4 adds constants MADV_COLD and MADV_PAGEOUT (defined with the
same values on all architectures). This patch adds them to
bits/mman-linux.h.
Tested for x86_64.
diff --git a/sysdeps/unix/sysv/linux/bits/mman-linux.h b/sysdeps/unix/sysv/linux/bits/mman-linux.h
index d6755c59d5..c0b11bfe24 100644
--- a/sysdeps/unix/sysv/linux/bits/mman-linux.h
+++ b/sysdeps/unix/sysv/linux/bits/mman-linux.h
@@ -87,6 +87,8 @@
# define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag. */
# define MADV_WIPEONFORK 18 /* Zero memory on fork, child only. */
# define MADV_KEEPONFORK 19 /* Undo MADV_WIPEONFORK. */
+# define MADV_COLD 20 /* Deactivate these pages. */
+# define MADV_PAGEOUT 21 /* Reclaim these pages. */
# define MADV_HWPOISON 100 /* Poison a page for testing. */
#endif
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: Define MADV_COLD and MADV_PAGEOUT from Linux 5.4
2019-11-27 23:45 Define MADV_COLD and MADV_PAGEOUT from Linux 5.4 Joseph Myers
@ 2019-11-28 6:50 ` Florian Weimer
0 siblings, 0 replies; 2+ messages in thread
From: Florian Weimer @ 2019-11-28 6:50 UTC (permalink / raw
To: Joseph Myers; +Cc: libc-alpha
* Joseph Myers:
> Linux 5.4 adds constants MADV_COLD and MADV_PAGEOUT (defined with the
> same values on all architectures). This patch adds them to
> bits/mman-linux.h.
>
> Tested for x86_64.
>
> diff --git a/sysdeps/unix/sysv/linux/bits/mman-linux.h
> b/sysdeps/unix/sysv/linux/bits/mman-linux.h
> index d6755c59d5..c0b11bfe24 100644
> --- a/sysdeps/unix/sysv/linux/bits/mman-linux.h
> +++ b/sysdeps/unix/sysv/linux/bits/mman-linux.h
> @@ -87,6 +87,8 @@
> # define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag. */
> # define MADV_WIPEONFORK 18 /* Zero memory on fork, child only. */
> # define MADV_KEEPONFORK 19 /* Undo MADV_WIPEONFORK. */
> +# define MADV_COLD 20 /* Deactivate these pages. */
> +# define MADV_PAGEOUT 21 /* Reclaim these pages. */
> # define MADV_HWPOISON 100 /* Poison a page for testing. */
> #endif
I've verified that this matches what's in the UAPI headers. Looks good.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-11-28 6:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-27 23:45 Define MADV_COLD and MADV_PAGEOUT from Linux 5.4 Joseph Myers
2019-11-28 6:50 ` Florian Weimer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).