svn commit: r206140 - head/sys/vm

Rui Paulo rpaulo at freebsd.org
Mon Apr 5 13:58:59 UTC 2010


Hi,

On 3 Apr 2010, at 17:20, Alan Cox wrote:

> Author: alc
> Date: Sat Apr  3 16:20:22 2010
> New Revision: 206140
> URL: http://svn.freebsd.org/changeset/base/206140
> 
> Log:
>  Re-enable the call to pmap_release() by vmspace_dofree().  The accounting
>  problem that is described in the comment has been addressed.
> 
>  Submitted by:	kib
>  Tested by:	pho (a few months ago)
>  MFC after:	6 weeks
> 
> Modified:
>  head/sys/vm/vm_map.c
> 
> Modified: head/sys/vm/vm_map.c
> ==============================================================================
> --- head/sys/vm/vm_map.c	Sat Apr  3 15:52:32 2010	(r206139)
> +++ head/sys/vm/vm_map.c	Sat Apr  3 16:20:22 2010	(r206140)
> @@ -313,6 +313,7 @@ vm_init2(void)
> static inline void
> vmspace_dofree(struct vmspace *vm)
> {
> +
> 	CTR1(KTR_VM, "vmspace_free: %p", vm);
> 
> 	/*
> @@ -329,12 +330,8 @@ vmspace_dofree(struct vmspace *vm)
> 	(void)vm_map_remove(&vm->vm_map, vm->vm_map.min_offset,
> 	    vm->vm_map.max_offset);
> 
> -	/*
> -	 * XXX Comment out the pmap_release call for now. The
> -	 * vmspace_zone is marked as UMA_ZONE_NOFREE, and bugs cause
> -	 * pmap.resident_count to be != 0 on exit sometimes.
> -	 */
> -/* 	pmap_release(vmspace_pmap(vm)); */
> +	pmap_release(vmspace_pmap(vm));
> +	vm->vm_map.pmap = NULL;
> 	uma_zfree(vmspace_zone, vm);
> }
> 

Unfortunately, this causes a panic on MIPS. I don't know enough about the VM subsystem to help with fixing this but if you want me to investigate something, I can do it.

NFS ROOT: 192.168.5.1:/zoo/rpaulo/millipede1
warning: no time-of-day clock registered, system time will not be set accurately
warning: no time-of-day clock registered, system time will not be set accurately
Interface rge1 IP-Address 192.168.5.16 Broadcast 192.168.5.255 
panic: lock "pmap" 0xc6c320dc already initialized
KDB: enter: panic
[ thread pid 31 tid 100042 ]
Stopped at      kdb_enter+0x50: lui     at,0x8047
db> bt
Tracing pid 31 tid 100042 td 0xc829e260
db_trace_thread+30 (?,?,?,?) ra 8011ee48 sp d37ed820 sz 24
8011ed2c+11c (0,?,ffffffff,?) ra 8011e4f0 sp d37ed838 sz 32
8011e15c+394 (?,?,?,?) ra 8011e680 sp d37ed858 sz 168
db_command_loop+78 (?,?,?,?) ra 80120c98 sp d37ed900 sz 24
80120b90+108 (?,?,?,?) ra 80227c74 sp d37ed918 sz 424
kdb_trap+10c (?,?,?,?) ra 8038b8fc sp d37edac0 sz 32
trap+b88 (?,?,?,?) ra 80383fa8 sp d37edae0 sz 168
MipsKernGenException+10c (0,a,804c2fe4,109) ra 80227ecc sp d37edb88 sz 200
kdb_enter+50 (?,?,?,?) ra 801f2184 sp d37edc50 sz 24
panic+f8 (?,803fb4e0,c6c320dc,c6c320dc) ra 80228a74 sp d37edc68 sz 40
lock_init+30 (?,?,?,?) ra 801e2114 sp d37edc90 sz 24
mtx_init+100 (?,?,?,?) ra 80386fd4 sp d37edca8 sz 32
pmap_pinit+34 (?,?,?,?) ra 8036dab8 sp d37edcc8 sz 48
vmspace_alloc+48 (?,?,?,?) ra 8036dc08 sp d37edcf8 sz 32
vmspace_fork+58 (c6c320f0,d37edd78,?,?) ra 801c7240 sp d37edd18 sz 72
fork1+234 (?,?,?,d37eddc8) ra 801c845c sp d37edd60 sz 88
fork+20 (?,?,?,?) ra 8038b694 sp d37eddb8 sz 32
trap+920 (?,?,?,?) ra 80384174 sp d37eddd8 sz 168
MipsUserGenException+10c (?,?,?,501dbd30) ra 0 sp d37ede80 sz 0
pid 31  
db> ps  
 pid  ppid  pgrp   uid   state   wmesg     wchan    cmd
  31    17    17     0  R+      CPU 0               sh
  18     0     0     0  SL      -        0x8047b804 [nfsiod 0]
  17     1    17     0  Ss+     wait     0xc82a1590 sh
  16     0     0     0  DL      -        0x80471354 [schedcpu]
  15     0     0     0  DL      syncer   0x80476d14 [syncer]
   9     0     0     0  DL      vlruwt   0xc82a4000 [vnlru]
   8     0     0     0  DL      psleep   0x80476a3c [bufdaemon]
   7     0     0     0  DL      pgzero   0x8047c95c [pagezero]
   6     0     0     0  DL      psleep   0x8047c588 [pagedaemon]
   5     0     0     0  DL      ccb_scan 0x8046b57c [xpt_thrd]
  14     0     0     0  WL                          [msg_intr0]
  13     0     0     0  DL      (threaded)          [usb]
100021                   D       -        0xc6cb0d0c [usbus0]
100020                   D       -        0xc6cb0cdc [usbus0]
100019                   D       -        0xc6cb0cac [usbus0]
100018                   D       -        0xc6cb0c7c [usbus0]
  12     0     0     0  DL      -        0x80471354 [yarrow]
   4     0     0     0  DL      -        0x8046f280 [g_down]
   3     0     0     0  DL      -        0x8046f27c [g_up]
   2     0     0     0  DL      -        0x8046f274 [g_event]
  11     0     0     0  RL      (threaded)          [intr]
100031                   I                           [hard intr35: mskc]
100030                   I                           [hard intr32: rge]
100029                   I                           [hard intr31: rge]
100028                   I                           [hard intr30: rge]
100027                   I                           [hard intr29: rge]
100026                   I                           [hard intr28: rge]
100025                   I                           [hard intr27: rge]
100024                   I                           [hard intr26: rge]
100022                   I                           [hard intr25: rge]
100017                   I                           [hard intr39: ehci]
100016                   I                           [swi0: uart]
100015                   I                           [swi6: Giant taskq]
100013                   I                           [swi5: +]
100011                   I                           [swi2: cambio]
100010                   I                           [swi6: task queue]
100005                   RunQ                        [swi4: clock]
100004                   I                           [swi3: vm]
100003                   I                           [swi1: netisr 0]
  10     0     0     0  RL                          [idle]
   1     0     1     0  SLs     wait     0xc6c2f000 [init]
   0     0     0     0  DLs     (threaded)          [kernel]
100014                   D       -        0xc6c99080 [thread taskq]
100012                   D       -        0xc6c99140 [kqueue taskq]
100000                   D       sched    0x8046f2d8 [swapper]

Regards,
--
Rui Paulo



More information about the svn-src-all mailing list