mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
Introduce two new sysctl's.. vm.kvm_size and vm.kvm_free. These are
purely informational and can give some advance indications of tuning problems. These are i386 only for now as it seems that the i386 is the only one suffering kvm pressure.
This commit is contained in:
parent
c412ee3a28
commit
3d6fde76ed
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=82121
@ -83,6 +83,7 @@
|
||||
#include <sys/sx.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/vmmeter.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
#include <vm/vm.h>
|
||||
#include <vm/vm_param.h>
|
||||
@ -1366,6 +1367,26 @@ pmap_release(pmap)
|
||||
if (ptdpg && !pmap_release_free_page(pmap, ptdpg))
|
||||
goto retry;
|
||||
}
|
||||
|
||||
static int
|
||||
kvm_size(SYSCTL_HANDLER_ARGS)
|
||||
{
|
||||
unsigned long ksize = VM_MAX_KERNEL_ADDRESS - KERNBASE;
|
||||
|
||||
return sysctl_handle_long(oidp, &ksize, 0, req);
|
||||
}
|
||||
SYSCTL_PROC(_vm, OID_AUTO, kvm_size, CTLTYPE_LONG|CTLFLAG_RD,
|
||||
0, 0, kvm_size, "IU", "Size of KVM");
|
||||
|
||||
static int
|
||||
kvm_free(SYSCTL_HANDLER_ARGS)
|
||||
{
|
||||
unsigned long kfree = VM_MAX_KERNEL_ADDRESS - kernel_vm_end;
|
||||
|
||||
return sysctl_handle_long(oidp, &kfree, 0, req);
|
||||
}
|
||||
SYSCTL_PROC(_vm, OID_AUTO, kvm_free, CTLTYPE_LONG|CTLFLAG_RD,
|
||||
0, 0, kvm_free, "IU", "Amount of KVM free");
|
||||
|
||||
/*
|
||||
* grow the number of kernel page table entries, if needed
|
||||
|
@ -83,6 +83,7 @@
|
||||
#include <sys/sx.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/vmmeter.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
#include <vm/vm.h>
|
||||
#include <vm/vm_param.h>
|
||||
@ -1366,6 +1367,26 @@ pmap_release(pmap)
|
||||
if (ptdpg && !pmap_release_free_page(pmap, ptdpg))
|
||||
goto retry;
|
||||
}
|
||||
|
||||
static int
|
||||
kvm_size(SYSCTL_HANDLER_ARGS)
|
||||
{
|
||||
unsigned long ksize = VM_MAX_KERNEL_ADDRESS - KERNBASE;
|
||||
|
||||
return sysctl_handle_long(oidp, &ksize, 0, req);
|
||||
}
|
||||
SYSCTL_PROC(_vm, OID_AUTO, kvm_size, CTLTYPE_LONG|CTLFLAG_RD,
|
||||
0, 0, kvm_size, "IU", "Size of KVM");
|
||||
|
||||
static int
|
||||
kvm_free(SYSCTL_HANDLER_ARGS)
|
||||
{
|
||||
unsigned long kfree = VM_MAX_KERNEL_ADDRESS - kernel_vm_end;
|
||||
|
||||
return sysctl_handle_long(oidp, &kfree, 0, req);
|
||||
}
|
||||
SYSCTL_PROC(_vm, OID_AUTO, kvm_free, CTLTYPE_LONG|CTLFLAG_RD,
|
||||
0, 0, kvm_free, "IU", "Amount of KVM free");
|
||||
|
||||
/*
|
||||
* grow the number of kernel page table entries, if needed
|
||||
|
Loading…
Reference in New Issue
Block a user