public inbox for email@example.com
help / color / mirror / Atom feed
* [newlib-cygwin] Include the psind in data returned by mincore(2).
@ 2022-07-11 11:52 Sebastian Huber
0 siblings, 0 replies; only message in thread
From: Sebastian Huber @ 2022-07-11 11:52 UTC (permalink / raw)
Author: Mark Johnston <markj@FreeBSD.org>
Date: Wed Sep 2 18:16:43 2020 +0000
Include the psind in data returned by mincore(2).
Currently we use a single bit to indicate whether the virtual page is
part of a superpage. To support a forthcoming implementation of
non-transparent 1GB superpages, it is useful to provide more detailed
information about large page sizes.
The change converts MINCORE_SUPER into a mask for MINCORE_PSIND(psind)
values, indicating a mapping of size psind, where psind is an index into
the pagesizes array returned by getpagesizes(3), which in turn comes
from the hw.pagesizes sysctl. MINCORE_PSIND(1) is equal to the old
value of MINCORE_SUPER.
For now, two bits are used to record the page size, permitting values
of MAXPAGESIZES up to 4.
Reviewed by: alc, kib
Sponsored by: Juniper Networks, Inc.
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D26238
newlib/libc/sys/rtems/include/sys/mman.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/newlib/libc/sys/rtems/include/sys/mman.h b/newlib/libc/sys/rtems/include/sys/mman.h
index 99c1eb8b3..6d861422d 100644
@@ -179,7 +179,8 @@
#define MINCORE_MODIFIED 0x4 /* Page has been modified by us */
#define MINCORE_REFERENCED_OTHER 0x8 /* Page has been referenced */
#define MINCORE_MODIFIED_OTHER 0x10 /* Page has been modified */
-#define MINCORE_SUPER 0x20 /* Page is a "super" page */
+#define MINCORE_SUPER 0x60 /* Page is a "super" page */
+#define MINCORE_PSIND(i) (((i) << 5) & MINCORE_SUPER) /* Page size */
* Anonymous object constant for shm_open().
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-07-11 11:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-11 11:52 [newlib-cygwin] Include the psind in data returned by mincore(2) Sebastian Huber
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).