7#ifndef ZEPHYR_INCLUDE_KERNEL_MM_DEMAND_PAGING_H
8#define ZEPHYR_INCLUDE_KERNEL_MM_DEMAND_PAGING_H
36#if defined(CONFIG_DEMAND_PAGING_STATS) || defined(__DOXYGEN__)
47#if !defined(CONFIG_DEMAND_PAGING_ALLOW_IRQ) || defined(__DOXYGEN__)
67#if defined(CONFIG_DEMAND_PAGING_TIMING_HISTOGRAM) || defined(__DOXYGEN__)
69 unsigned long counts[CONFIG_DEMAND_PAGING_TIMING_HISTOGRAM_NUM_BINS];
74 unsigned long bounds[CONFIG_DEMAND_PAGING_TIMING_HISTOGRAM_NUM_BINS];
206#include <syscalls/demand_paging.h>
void k_mem_paging_backing_store_page_finalize(struct z_page_frame *pf, uintptr_t location)
Update internal accounting after a page-in.
void k_mem_paging_backing_store_page_out(uintptr_t location)
Copy a data page from Z_SCRATCH_PAGE to the specified location.
void k_mem_paging_backing_store_location_free(uintptr_t location)
Free a backing store location.
void k_mem_paging_backing_store_init(void)
Backing store initialization function.
void k_mem_paging_backing_store_page_in(uintptr_t location)
Copy a data page from the provided location to Z_SCRATCH_PAGE.
int k_mem_paging_backing_store_location_get(struct z_page_frame *pf, uintptr_t *location, bool page_fault)
Reserve or fetch a storage location for a data page loaded into a page frame.
struct z_page_frame * k_mem_paging_eviction_select(bool *dirty)
Select a page frame for eviction.
void k_mem_paging_eviction_init(void)
Initialization function.
int k_mem_page_out(void *addr, size_t size)
Evict a page-aligned virtual memory region to the backing store.
void k_mem_paging_histogram_backing_store_page_in_get(struct k_mem_paging_histogram_t *hist)
Get the backing store page-in timing histogram.
void k_mem_unpin(void *addr, size_t size)
Un-pin an aligned virtual data region.
void k_mem_paging_stats_get(struct k_mem_paging_stats_t *stats)
Get the paging statistics since system startup.
void k_mem_pin(void *addr, size_t size)
Pin an aligned virtual data region, paging in as necessary.
void k_mem_page_in(void *addr, size_t size)
Load a virtual data region into memory.
void k_mem_paging_histogram_backing_store_page_out_get(struct k_mem_paging_histogram_t *hist)
Get the backing store page-out timing histogram.
void k_mem_paging_histogram_eviction_get(struct k_mem_paging_histogram_t *hist)
Get the eviction timing histogram.
void k_mem_paging_thread_stats_get(struct k_thread *thread, struct k_mem_paging_stats_t *stats)
Get the paging statistics since system startup for a thread.
__UINTPTR_TYPE__ uintptr_t
Definition: stdint.h:105
Paging Statistics Histograms.
Definition: demand_paging.h:66
unsigned long counts[CONFIG_DEMAND_PAGING_TIMING_HISTOGRAM_NUM_BINS]
Definition: demand_paging.h:69
unsigned long bounds[CONFIG_DEMAND_PAGING_TIMING_HISTOGRAM_NUM_BINS]
Definition: demand_paging.h:74
Paging Statistics.
Definition: demand_paging.h:35
unsigned long in_isr
Number of page faults while in ISR.
Definition: demand_paging.h:49
unsigned long irq_unlocked
Number of page faults with IRQ unlocked.
Definition: demand_paging.h:45
unsigned long cnt
Number of page faults.
Definition: demand_paging.h:39
unsigned long dirty
Number of dirty pages selected for eviction.
Definition: demand_paging.h:58
unsigned long clean
Number of clean pages selected for eviction.
Definition: demand_paging.h:55
unsigned long irq_locked
Number of page faults with IRQ locked.
Definition: demand_paging.h:42
struct k_mem_paging_stats_t::@253 eviction
struct k_mem_paging_stats_t::@252 pagefaults
Thread Structure.
Definition: thread.h:259