Changeset View
Changeset View
Standalone View
Standalone View
sys/vm/vm_kern.c
Show First 20 Lines • Show All 74 Lines • ▼ Show 20 Lines | |||||
#include <sys/domainset.h> | #include <sys/domainset.h> | ||||
#include <sys/eventhandler.h> | #include <sys/eventhandler.h> | ||||
#include <sys/kernel.h> | #include <sys/kernel.h> | ||||
#include <sys/lock.h> | #include <sys/lock.h> | ||||
#include <sys/malloc.h> | #include <sys/malloc.h> | ||||
#include <sys/msan.h> | #include <sys/msan.h> | ||||
#include <sys/proc.h> | #include <sys/proc.h> | ||||
#include <sys/rwlock.h> | #include <sys/rwlock.h> | ||||
#include <sys/smp.h> | |||||
#include <sys/sysctl.h> | #include <sys/sysctl.h> | ||||
#include <sys/vmem.h> | #include <sys/vmem.h> | ||||
#include <sys/vmmeter.h> | #include <sys/vmmeter.h> | ||||
#include <vm/vm.h> | #include <vm/vm.h> | ||||
#include <vm/vm_param.h> | #include <vm/vm_param.h> | ||||
#include <vm/vm_domainset.h> | #include <vm/vm_domainset.h> | ||||
#include <vm/vm_kern.h> | #include <vm/vm_kern.h> | ||||
▲ Show 20 Lines • Show All 804 Lines • ▼ Show 20 Lines | for (va = start; va < end; va += PAGE_SIZE) { | ||||
vm_domain_freecnt_inc(vmd, 1); | vm_domain_freecnt_inc(vmd, 1); | ||||
vm_cnt.v_page_count++; | vm_cnt.v_page_count++; | ||||
} | } | ||||
pmap_remove(kernel_pmap, start, end); | pmap_remove(kernel_pmap, start, end); | ||||
(void)vmem_add(kernel_arena, start, end - start, M_WAITOK); | (void)vmem_add(kernel_arena, start, end - start, M_WAITOK); | ||||
#endif | #endif | ||||
} | } | ||||
#ifdef PMAP_WANT_ACTIVE_CPUS_NAIVE | |||||
void | |||||
pmap_active_cpus(pmap_t pmap, cpuset_t *res) | |||||
theraven: I don't see any references to this function in the diff, what calls it? | |||||
Done Inline ActionsIt is actually pmap_active_cpus(), I did some rototiling for arm64 and did not rechecked afterward. kib: It is actually pmap_active_cpus(), I did some rototiling for arm64 and did not rechecked… | |||||
{ | |||||
struct thread *td; | |||||
struct proc *p; | |||||
struct vmspace *vm; | |||||
int c; | |||||
CPU_ZERO(res); | |||||
CPU_FOREACH(c) { | |||||
td = cpuid_to_pcpu[c]->pc_curthread; | |||||
p = td->td_proc; | |||||
if (p == NULL) | |||||
continue; | |||||
vm = vmspace_acquire_ref(p); | |||||
if (vm == NULL) | |||||
continue; | |||||
if (pmap == vmspace_pmap(vm)) | |||||
CPU_SET(c, res); | |||||
vmspace_free(vm); | |||||
} | |||||
} | |||||
#endif | |||||
/* | /* | ||||
* Allow userspace to directly trigger the VM drain routine for testing | * Allow userspace to directly trigger the VM drain routine for testing | ||||
* purposes. | * purposes. | ||||
*/ | */ | ||||
static int | static int | ||||
debug_vm_lowmem(SYSCTL_HANDLER_ARGS) | debug_vm_lowmem(SYSCTL_HANDLER_ARGS) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 59 Lines • Show Last 20 Lines |
I don't see any references to this function in the diff, what calls it?