]> xenbits.xensource.com Git - people/royger/freebsd.git/commitdiff
Provide introductory description of the default pager.
authorkib <kib@FreeBSD.org>
Wed, 14 Dec 2016 23:36:32 +0000 (23:36 +0000)
committerkib <kib@FreeBSD.org>
Wed, 14 Dec 2016 23:36:32 +0000 (23:36 +0000)
Reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

sys/vm/default_pager.c

index d08e5f54a318819f44e995cd6c90c4413947dc2e..8887e95f1e9a27931a46d6bf01ee9bd6f2ce2803 100644 (file)
@@ -57,6 +57,16 @@ static boolean_t     default_pager_haspage(vm_object_t, vm_pindex_t, int *,
 
 /*
  * pagerops for OBJT_DEFAULT - "default pager".
+ *
+ * This pager handles anonymous (no handle) swap-backed memory, just
+ * like the swap pager.  It allows several optimizations based on the
+ * fact that no pages of a default object can be swapped out.  The
+ * most important optimization is in vm_fault(), where the pager is
+ * never asked for a non-resident page.  Instead, a freshly allocated
+ * zeroed page is used.
+ *
+ * On the first request to page out a page from a default object, the
+ * object is converted to swap pager type.
  */
 struct pagerops defaultpagerops = {
        .pgo_alloc =    default_pager_alloc,