FreeBSD virtual memory subsystem code
sg_pager.c File Reference
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/rwlock.h>
#include <sys/sglist.h>
#include <sys/user.h>
#include <sys/vmmeter.h>
#include <vm/vm.h>
#include <vm/vm_param.h>
#include <vm/vm_object.h>
#include <vm/vm_page.h>
#include <vm/vm_pager.h>
#include <vm/vm_phys.h>
#include <vm/uma.h>
Include dependency graph for sg_pager.c:

Go to the source code of this file.

Functions

 __FBSDID ("$FreeBSD$")
 
static vm_object_t sg_pager_alloc (void *, vm_ooffset_t, vm_prot_t, vm_ooffset_t, struct ucred *)
 
static void sg_pager_dealloc (vm_object_t)
 
static int sg_pager_getpages (vm_object_t, vm_page_t *, int, int *, int *)
 
static void sg_pager_putpages (vm_object_t, vm_page_t *, int, boolean_t, int *)
 
static boolean_t sg_pager_haspage (vm_object_t, vm_pindex_t, int *, int *)
 

Variables

const struct pagerops sgpagerops
 

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ sg_pager_alloc()

static vm_object_t sg_pager_alloc ( void *  handle,
vm_ooffset_t  size,
vm_prot_t  prot,
vm_ooffset_t  foff,
struct ucred *  cred 
)
static

Definition at line 73 of file sg_pager.c.

References OBJT_SG, OFF_TO_IDX, vm_object::sgp, vm_object::un_pager, and vm_object_allocate().

Here is the call graph for this function:

◆ sg_pager_dealloc()

static void sg_pager_dealloc ( vm_object_t  object)
static

Definition at line 125 of file sg_pager.c.

References OBJT_DEAD, vm_object::sgp, vm_object::un_pager, VM_ALLOC_WAITFAIL, vm_page_busy_acquire(), and vm_page_putfake().

Here is the call graph for this function:

◆ sg_pager_getpages()

static int sg_pager_getpages ( vm_object_t  object,
vm_page_t *  m,
int  count,
int *  rbehind,
int *  rahead 
)
static

◆ sg_pager_haspage()

static boolean_t sg_pager_haspage ( vm_object_t  object,
vm_pindex_t  pindex,
int *  before,
int *  after 
)
static

Definition at line 221 of file sg_pager.c.

◆ sg_pager_putpages()

static void sg_pager_putpages ( vm_object_t  object,
vm_page_t *  m,
int  count,
boolean_t  sync,
int *  rtvals 
)
static

Definition at line 213 of file sg_pager.c.

Variable Documentation

◆ sgpagerops

const struct pagerops sgpagerops
Initial value:
= {
.pgo_kvme_type = KVME_TYPE_SG,
.pgo_alloc = sg_pager_alloc,
.pgo_dealloc = sg_pager_dealloc,
.pgo_getpages = sg_pager_getpages,
.pgo_putpages = sg_pager_putpages,
.pgo_haspage = sg_pager_haspage,
}
static void sg_pager_putpages(vm_object_t, vm_page_t *, int, boolean_t, int *)
Definition: sg_pager.c:213
static vm_object_t sg_pager_alloc(void *, vm_ooffset_t, vm_prot_t, vm_ooffset_t, struct ucred *)
Definition: sg_pager.c:73
static int sg_pager_getpages(vm_object_t, vm_page_t *, int, int *, int *)
Definition: sg_pager.c:147
static boolean_t sg_pager_haspage(vm_object_t, vm_pindex_t, int *, int *)
Definition: sg_pager.c:221
static void sg_pager_dealloc(vm_object_t)
Definition: sg_pager.c:125

Definition at line 63 of file sg_pager.c.