FreeBSD virtual memory subsystem code
vm_phys.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  mem_affinity
 

Functions

void vm_phys_add_seg (vm_paddr_t start, vm_paddr_t end)
 
vm_page_t vm_phys_alloc_contig (int domain, u_long npages, vm_paddr_t low, vm_paddr_t high, u_long alignment, vm_paddr_t boundary)
 
vm_page_t vm_phys_alloc_freelist_pages (int domain, int freelist, int pool, int order)
 
int vm_phys_alloc_npages (int domain, int pool, int npages, vm_page_t ma[])
 
vm_page_t vm_phys_alloc_pages (int domain, int pool, int order)
 
int vm_phys_domain_match (int prefer, vm_paddr_t low, vm_paddr_t high)
 
void vm_phys_enqueue_contig (vm_page_t m, u_long npages)
 
int vm_phys_fictitious_reg_range (vm_paddr_t start, vm_paddr_t end, vm_memattr_t memattr)
 
void vm_phys_fictitious_unreg_range (vm_paddr_t start, vm_paddr_t end)
 
vm_page_t vm_phys_fictitious_to_vm_page (vm_paddr_t pa)
 
void vm_phys_free_contig (vm_page_t m, u_long npages)
 
void vm_phys_free_pages (vm_page_t m, int order)
 
void vm_phys_init (void)
 
vm_page_t vm_phys_paddr_to_vm_page (vm_paddr_t pa)
 
void vm_phys_register_domains (int ndomains, struct mem_affinity *affinity, int *locality)
 
vm_page_t vm_phys_scan_contig (int domain, u_long npages, vm_paddr_t low, vm_paddr_t high, u_long alignment, vm_paddr_t boundary, int options)
 
boolean_t vm_phys_unfree_page (vm_page_t m)
 
int vm_phys_mem_affinity (int f, int t)
 
void vm_phys_early_add_seg (vm_paddr_t start, vm_paddr_t end)
 
vm_paddr_t vm_phys_early_alloc (int domain, size_t alloc_size)
 
void vm_phys_early_startup (void)
 
int vm_phys_avail_largest (void)
 
vm_paddr_t vm_phys_avail_size (int i)
 
bool vm_phys_is_dumpable (vm_paddr_t pa)
 
static int vm_phys_domain (vm_paddr_t pa)
 

Variables

vm_paddr_t phys_avail []
 

Function Documentation

◆ vm_phys_add_seg()

void vm_phys_add_seg ( vm_paddr_t  start,
vm_paddr_t  end 
)

Definition at line 454 of file vm_phys.c.

References vm_phys_seg::end, vm_phys_seg::start, and vm_phys_create_seg().

Referenced by vm_page_startup(), and vm_phys_early_startup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vm_phys_alloc_contig()

vm_page_t vm_phys_alloc_contig ( int  domain,
u_long  npages,
vm_paddr_t  low,
vm_paddr_t  high,
u_long  alignment,
vm_paddr_t  boundary 
)

Definition at line 1364 of file vm_phys.c.

References vm_phys_seg::domain, vm_phys_seg::end, vm_phys_seg::start, VM_DOMAIN, vm_domain_free_assert_locked, vm_phys_alloc_seg_contig(), vm_phys_nsegs, and vm_phys_segs.

Referenced by vm_page_find_contig_domain().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vm_phys_alloc_freelist_pages()

vm_page_t vm_phys_alloc_freelist_pages ( int  domain,
int  freelist,
int  pool,
int  order 
)

Definition at line 835 of file vm_phys.c.

References vm_freelist::pl, VM_DOMAIN, vm_domain_free_assert_locked, vm_freelist_rem(), vm_ndomains, vm_phys_set_pool(), and vm_phys_split_pages().

Referenced by _vm_page_alloc_noobj_domain(), and vm_phys_alloc_pages().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vm_phys_alloc_npages()

int vm_phys_alloc_npages ( int  domain,
int  pool,
int  npages,
vm_page_t  ma[] 
)

Definition at line 740 of file vm_phys.c.

References vm_freelist::pl, VM_DOMAIN, vm_domain_free_assert_locked, vm_freelist_rem(), vm_ndomains, vm_phys_enq_range(), and vm_phys_set_pool().

Referenced by vm_page_zone_import().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vm_phys_alloc_pages()

vm_page_t vm_phys_alloc_pages ( int  domain,
int  pool,
int  order 
)

Definition at line 814 of file vm_phys.c.

References vm_phys_alloc_freelist_pages().

Referenced by _vm_page_alloc_noobj_domain(), and vm_page_alloc_domain_after().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vm_phys_avail_largest()

int vm_phys_avail_largest ( void  )

Definition at line 1544 of file vm_phys.c.

References phys_avail, and vm_phys_avail_size().

Referenced by vm_page_startup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vm_phys_avail_size()

vm_paddr_t vm_phys_avail_size ( int  i)

Definition at line 1564 of file vm_phys.c.

References phys_avail.

Referenced by vm_page_startup(), vm_phys_avail_largest(), and vm_phys_early_alloc().

Here is the caller graph for this function:

◆ vm_phys_domain()

static int vm_phys_domain ( vm_paddr_t  pa)
inlinestatic

Definition at line 92 of file vm_phys.h.

References mem_affinity::domain, mem_affinity::end, mem_affinity::start, and vm_ndomains.

◆ vm_phys_domain_match()

int vm_phys_domain_match ( int  prefer,
vm_paddr_t  low,
vm_paddr_t  high 
)

Definition at line 226 of file vm_phys.c.

References mem_affinity::end, and vm_ndomains.

◆ vm_phys_early_add_seg()

void vm_phys_early_add_seg ( vm_paddr_t  start,
vm_paddr_t  end 
)

◆ vm_phys_early_alloc()

vm_paddr_t vm_phys_early_alloc ( int  domain,
size_t  alloc_size 
)

Definition at line 1633 of file vm_phys.c.

References vm_phys_seg::domain, mem_affinity::end, phys_avail, mem_affinity::start, vm_ndomains, vm_phys_avail_check(), vm_phys_avail_size(), and vm_phys_avail_split().

Here is the call graph for this function:

◆ vm_phys_early_startup()

void vm_phys_early_startup ( void  )

Definition at line 1716 of file vm_phys.c.

References vm_phys_seg::end, mem_affinity::end, phys_avail, vm_phys_seg::start, vm_phys_add_seg(), vm_phys_avail_split(), vm_phys_early_nsegs, and vm_phys_early_segs.

Referenced by vm_page_startup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vm_phys_enqueue_contig()

void vm_phys_enqueue_contig ( vm_page_t  m,
u_long  npages 
)

Definition at line 1161 of file vm_phys.c.

References vm_phys_seg::free_queues, max_order(), vm_domain_free_assert_locked, vm_freelist_add(), vm_pagequeue_domain(), and vm_phys_segs.

Referenced by vm_page_startup(), and vm_phys_free_contig().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vm_phys_fictitious_reg_range()

int vm_phys_fictitious_reg_range ( vm_paddr_t  start,
vm_paddr_t  end,
vm_memattr_t  memattr 
)

Definition at line 945 of file vm_phys.c.

References first_page, vm_page_array, vm_page_array_size, vm_phys_fictitious_init_range(), and vm_phys_fictitious_reg_lock.

Here is the call graph for this function:

◆ vm_phys_fictitious_to_vm_page()

vm_page_t vm_phys_fictitious_to_vm_page ( vm_paddr_t  pa)

Definition at line 909 of file vm_phys.c.

References PG_FICTITIOUS, and vm_phys_fictitious_reg_lock.

Referenced by PHYS_TO_VM_PAGE().

Here is the caller graph for this function:

◆ vm_phys_fictitious_unreg_range()

void vm_phys_fictitious_unreg_range ( vm_paddr_t  start,
vm_paddr_t  end 
)

Definition at line 1030 of file vm_phys.c.

References first_page, vm_page_array_size, and vm_phys_fictitious_reg_lock.

◆ vm_phys_free_contig()

void vm_phys_free_contig ( vm_page_t  m,
u_long  npages 
)

Definition at line 1210 of file vm_phys.c.

References max_order(), vm_domain_free_assert_locked, vm_pagequeue_domain(), vm_phys_enqueue_contig(), and vm_phys_free_pages().

Here is the call graph for this function:

◆ vm_phys_free_pages()

void vm_phys_free_pages ( vm_page_t  m,
int  order 
)

◆ vm_phys_init()

void vm_phys_init ( void  )

Definition at line 489 of file vm_phys.c.

References vm_phys_seg::domain, vm_phys_seg::end, vm_phys_seg::first_page, vm_phys_seg::free_queues, PHYS_TO_VM_PAGE(), vm_phys_seg::start, vm_ndomains, vm_page_array, vm_phys_fictitious_reg_lock, vm_phys_nsegs, and vm_phys_segs.

Referenced by vm_page_startup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vm_phys_is_dumpable()

bool vm_phys_is_dumpable ( vm_paddr_t  pa)

Definition at line 1598 of file vm_phys.c.

References dump_avail, PG_NODUMP, and vm_phys_paddr_to_vm_page().

Here is the call graph for this function:

◆ vm_phys_mem_affinity()

int vm_phys_mem_affinity ( int  f,
int  t 
)

Definition at line 330 of file vm_phys.c.

References vm_ndomains.

◆ vm_phys_paddr_to_vm_page()

vm_page_t vm_phys_paddr_to_vm_page ( vm_paddr_t  pa)

◆ vm_phys_register_domains()

void vm_phys_register_domains ( int  ndomains,
struct mem_affinity affinity,
int *  locality 
)

Definition at line 623 of file vm_phys.c.

References all_domains, and vm_ndomains.

◆ vm_phys_scan_contig()

vm_page_t vm_phys_scan_contig ( int  domain,
u_long  npages,
vm_paddr_t  low,
vm_paddr_t  high,
u_long  alignment,
vm_paddr_t  boundary,
int  options 
)

Definition at line 1249 of file vm_phys.c.

References vm_phys_seg::domain, vm_phys_seg::end, vm_phys_seg::first_page, vm_phys_seg::start, vm_page_scan_contig(), VM_PAGE_TO_PHYS, vm_phys_nsegs, and vm_phys_segs.

Referenced by vm_page_reclaim_contig_domain().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vm_phys_unfree_page()

boolean_t vm_phys_unfree_page ( vm_page_t  m)

Definition at line 1297 of file vm_phys.c.

References vm_phys_seg::domain, vm_phys_seg::first_page, vm_phys_seg::free_queues, vm_phys_seg::start, VM_DOMAIN, vm_domain_free_assert_locked, vm_freelist_add(), vm_freelist_rem(), and vm_phys_segs.

Referenced by vm_page_blacklist_add().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ phys_avail