Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Feb 1995 05:56:28 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        ROBIN@ptnsct.nis.za, davidg@Root.COM
Cc:        bugs@FreeBSD.org
Subject:   Re: MB_MAP FULL SYSTEM CRASH
Message-ID:  <199502271856.FAA16373@godzilla.zeta.org.au>

index | next in thread | raw e-mail

>>Now the old girl occasionaly (on a whim) says: "MB_MAP FULL" and crashes 
>>completely so it has to be reset.

>   The mb_map full message is only generated once and is just informational.
>Are you sure that the panic occurs just after this appears, or is it possible
>that it occurred sometime earlier?

>>Any ideas to help?

>   I need more information before I can help. I need the panic message and any
>additional information that may be printed before it.

I thought this was well known.  kmem_malloc() panics if mb_map is full
and (waitflag == M_WAITOK).  If (waitflag != M_WAITOK) when the map is
first found to be full, then m_clalloc() prints "mb map full".  If the
full condition persists, then kmem_malloc() eventually gets called with
(waitflag == M_WAITOK) and panics with the message "kmem_malloc: map too
small" (it stupidly doesn't tell you which map).

I use the following kludgy fix.  It works because all allocations of
mb_map go through ml_clalloc(), and ml_clalloc() handles the NULL return
value even in the M_WAITOK case.

Another problem is that if mb_map fills up due to transient loads, the
1 or 2MB of memory in it is never released.  This would not work well
on systems with 2 or 4MB of memory.

Bruce

*** vm_kern.c~	Wed Feb 22 08:49:18 1995
--- vm_kern.c	Wed Feb 22 08:49:47 1995
***************
*** 303,313 ****
  	if (vm_map_findspace(map, 0, size, &addr)) {
  		vm_map_unlock(map);
! #if 0
! 		if (canwait)	/* XXX  should wait */
! 			panic("kmem_malloc: %s too small",
! 			    map == kmem_map ? "kmem_map" : "mb_map");
! #endif
! 		if (waitflag == M_WAITOK)
! 			panic("kmem_malloc: map too small");
  		return (0);
  	}
--- 303,308 ----
  	if (vm_map_findspace(map, 0, size, &addr)) {
  		vm_map_unlock(map);
! 		if (waitflag == M_WAITOK && map != mb_map)
! 			panic("kmem_malloc: kmem_map too small");
  		return (0);
  	}


help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199502271856.FAA16373>