Recently, i386 (but specifically not amd64) machines have been
observed to hang in kmthread. Probably caused (exposed) by an earlier
change to add preemption in a few places. The diff below is believed
to at least partially address the problem by having kmthread wait at
least one time through, instead of spinning when it can't get the
kernel map lock.

Index: uvm_km.c
===================================================================
RCS file: /cvs/src/sys/uvm/uvm_km.c,v
retrieving revision 1.112
diff -u -p -r1.112 uvm_km.c
--- uvm_km.c    13 Apr 2014 23:14:15 -0000      1.112
+++ uvm_km.c    7 Jun 2014 06:56:10 -0000
@@ -727,7 +727,7 @@ uvm_km_thread(void *arg)
                                    NULL, UVM_UNKNOWN_OFFSET, 0,
                                    UVM_MAPFLAG(UVM_PROT_RW, UVM_PROT_RW,
                                    UVM_INH_NONE, UVM_ADV_RANDOM,
-                                   UVM_KMF_TRYLOCK)) != 0) {
+                                   i ? UVM_KMF_TRYLOCK : 0)) != 0) {
                                        pg[i] = 0;
                                        break;
                                }

Reply via email to