Changeset View
Changeset View
Standalone View
Standalone View
head/sys/vm/vm_glue.c
Show First 20 Lines • Show All 185 Lines • ▼ Show 20 Lines | #if 0 | ||||
* XXX - not yet | * XXX - not yet | ||||
* | * | ||||
* The limit for transient usage of wired pages should be | * The limit for transient usage of wired pages should be | ||||
* larger than for "permanent" wired pages (mlock()). | * larger than for "permanent" wired pages (mlock()). | ||||
* | * | ||||
* Also, the sysctl code, which is the only present user | * Also, the sysctl code, which is the only present user | ||||
* of vslock(), does a hard loop on EAGAIN. | * of vslock(), does a hard loop on EAGAIN. | ||||
*/ | */ | ||||
if (npages + vm_cnt.v_wire_count > vm_page_max_wired) | if (npages + vm_wire_count() > vm_page_max_wired) | ||||
return (EAGAIN); | return (EAGAIN); | ||||
#endif | #endif | ||||
error = vm_map_wire(&curproc->p_vmspace->vm_map, start, end, | error = vm_map_wire(&curproc->p_vmspace->vm_map, start, end, | ||||
VM_MAP_WIRE_SYSTEM | VM_MAP_WIRE_NOHOLES); | VM_MAP_WIRE_SYSTEM | VM_MAP_WIRE_NOHOLES); | ||||
/* | /* | ||||
* Return EFAULT on error to match copy{in,out}() behaviour | * Return EFAULT on error to match copy{in,out}() behaviour | ||||
* rather than returning ENOMEM like mlock() would. | * rather than returning ENOMEM like mlock() would. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 388 Lines • Show Last 20 Lines |