Date: Wed, 29 Jan 2020 12:02:47 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357253 - head/sys/vm Message-ID: <202001291202.00TC2lIa055211@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Wed Jan 29 12:02:47 2020 New Revision: 357253 URL: https://svnweb.freebsd.org/changeset/base/357253 Log: Restore OOM logic on page fault after r357026. Right now OOM is initiated unconditionally on the page allocation failure, after the wait. Reported by: Mark Millard <marklmi@yahoo.com> Reviewed by: cy, markj Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D23409 Modified: head/sys/vm/vm_fault.c Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Wed Jan 29 09:36:59 2020 (r357252) +++ head/sys/vm/vm_fault.c Wed Jan 29 12:02:47 2020 (r357253) @@ -1073,12 +1073,14 @@ vm_fault_allocate(struct faultstate *fs) fs->oom < vm_pfault_oom_attempts) { fs->oom++; vm_waitpfault(dset, vm_pfault_oom_wait * hz); + } else { + if (bootverbose) + printf( + "proc %d (%s) failed to alloc page on fault, starting OOM\n", + curproc->p_pid, curproc->p_comm); + vm_pageout_oom(VM_OOM_MEM_PF); + fs->oom = 0; } - if (bootverbose) - printf( -"proc %d (%s) failed to alloc page on fault, starting OOM\n", - curproc->p_pid, curproc->p_comm); - vm_pageout_oom(VM_OOM_MEM_PF); return (KERN_RESOURCE_SHORTAGE); } fs->oom = 0;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202001291202.00TC2lIa055211>