Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src/sys/uvm Pull up following revision(s) (requested by chs i...



details:   https://anonhg.NetBSD.org/src/rev/83e03b36c101
branches:  netbsd-8
changeset: 450677:83e03b36c101
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Apr 22 08:05:51 2019 +0000

description:
Pull up following revision(s) (requested by chs in ticket #1236):

        sys/uvm/uvm_fault.c: revision 1.205

If a pager fault method returns ENOMEM but some memory appears to be reclaimable,
wake up the pagedaemon and retry the fault.  This fixes the problems with Xorg
being killed with an "out of swap" message due to a transient memory shortage.

diffstat:

 sys/uvm/uvm_fault.c |  14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diffs (35 lines):

diff -r d370b7babb32 -r 83e03b36c101 sys/uvm/uvm_fault.c
--- a/sys/uvm/uvm_fault.c       Sat Apr 20 13:58:18 2019 +0000
+++ b/sys/uvm/uvm_fault.c       Mon Apr 22 08:05:51 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_fault.c,v 1.199.6.3 2018/02/27 09:07:33 martin Exp $       */
+/*     $NetBSD: uvm_fault.c,v 1.199.6.4 2019/04/22 08:05:51 martin Exp $       */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_fault.c,v 1.199.6.3 2018/02/27 09:07:33 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_fault.c,v 1.199.6.4 2019/04/22 08:05:51 martin Exp $");
 
 #include "opt_uvmhist.h"
 
@@ -876,6 +876,16 @@
                                 * object fault routine responsible for
                                 * pmap_update().
                                 */
+
+                               /*
+                                * Wake up the pagedaemon if the fault method
+                                * failed for lack of memory but some can be
+                                * reclaimed.
+                                */
+                               if (error == ENOMEM && uvm_reclaimable()) {
+                                       uvm_wait("pgo_fault");
+                                       error = ERESTART;
+                               }
                        } else {
                                error = uvm_fault_lower(&ufi, &flt, pages);
                        }



Home | Main Index | Thread Index | Old Index