summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1996-05-10 19:28:55 +0000
committerwollman <wollman@FreeBSD.org>1996-05-10 19:28:55 +0000
commita28a8481af3f2a2145d2a6c164a6299934c2bb3f (patch)
treefab5023c844a9f8148e7c028b3bd0bc0cb934ed5 /sys/vm
parent32706d589a389e3534278d9dec0d4dc6fbacbeca (diff)
downloadFreeBSD-src-a28a8481af3f2a2145d2a6c164a6299934c2bb3f.zip
FreeBSD-src-a28a8481af3f2a2145d2a6c164a6299934c2bb3f.tar.gz
Allocate mbufs from a separate submap so that NMBCLUSTERS works as
expected.
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vm_kern.c16
-rw-r--r--sys/vm/vm_kern.h4
2 files changed, 15 insertions, 5 deletions
diff --git a/sys/vm/vm_kern.c b/sys/vm/vm_kern.c
index dcefdc0..a820f9d 100644
--- a/sys/vm/vm_kern.c
+++ b/sys/vm/vm_kern.c
@@ -61,7 +61,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: vm_kern.c,v 1.22 1996/01/31 12:05:52 davidg Exp $
+ * $Id: vm_kern.c,v 1.23 1996/04/24 04:16:44 dyson Exp $
*/
/*
@@ -94,6 +94,8 @@ vm_map_t kernel_map;
vm_map_t kmem_map;
vm_map_t mb_map;
int mb_map_full;
+vm_map_t mcl_map;
+int mcl_map_full;
vm_map_t io_map;
vm_map_t clean_map;
vm_map_t phys_map;
@@ -291,8 +293,8 @@ kmem_malloc(map, size, waitflag)
vm_offset_t addr;
vm_page_t m;
- if (map != kmem_map && map != mb_map)
- panic("kmem_malloc: map != {kmem,mb}_map");
+ if (map != kmem_map && map != mb_map && map != mcl_map)
+ panic("kmem_malloc: map != {kmem,mb,mcl}_map");
size = round_page(size);
addr = vm_map_min(map);
@@ -307,7 +309,13 @@ kmem_malloc(map, size, waitflag)
vm_map_unlock(map);
if (map == mb_map) {
mb_map_full = TRUE;
- log(LOG_ERR, "Out of mbuf clusters - increase maxusers!\n");
+ log(LOG_ERR, "Out of mbufs - increase maxusers!\n");
+ return (0);
+ }
+ if (map == mcl_map) {
+ mcl_map_full = TRUE;
+ log(LOG_ERR,
+ "Out of mbuf clusters - increase maxusers!\n");
return (0);
}
if (waitflag == M_WAITOK)
diff --git a/sys/vm/vm_kern.h b/sys/vm/vm_kern.h
index 57f4f1a..8fcbb04 100644
--- a/sys/vm/vm_kern.h
+++ b/sys/vm/vm_kern.h
@@ -61,7 +61,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: vm_kern.h,v 1.5 1995/01/09 16:05:44 davidg Exp $
+ * $Id: vm_kern.h,v 1.6 1995/07/29 11:44:22 bde Exp $
*/
#ifndef _VM_VM_KERN_H_
@@ -73,6 +73,8 @@ extern vm_map_t kernel_map;
extern vm_map_t kmem_map;
extern vm_map_t mb_map;
extern int mb_map_full;
+extern vm_map_t mcl_map;
+extern int mcl_map_full;
extern vm_map_t io_map;
extern vm_map_t clean_map;
extern vm_map_t phys_map;
OpenPOWER on IntegriCloud