One way to get this info would be to allow support two kinds of discardable:
"zero-map on discard" would be ideal for malloc cache (it doesn't care
if individual pages are zeroed, and may be possible without an extra
VMA in the malloc case).
"unmap on discard" would raise a SEGV when a discarded page is accessed,
allowing the app. to recreate the object containing the discarded page.
This opens a few interesting possibilites:
- The kernel will tend to discard old (age) pages not new ones.
So if only part of a discardable object is used a lot, the
remainder can be reclaimed.
- This is perfect for user-level paging. E.g., the non-aligned
file mappings in Wine, calculated large objects e.g. font cache in X.
The kernel can apply the same aging policies as it does for
kernel-level paging.
-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/