From 2b4a2c272dfbe96a0781a80cf741a6215203f13a Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 10 Jun 2002 06:11:45 +0000 Subject: [PATCH] o In vm_map_entry_create(), call uma_zalloc() with M_NOWAIT on system maps. Submitted by: tegge o Eliminate the "!mapentzone" check from vm_map_entry_create() and vm_map_entry_dispose(). Reviewed by: tegge o Fix white-space usage in vm_map_entry_create(). --- sys/vm/vm_map.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index bc1803c0468..e4bf9933cfb 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -504,8 +504,7 @@ vm_map_init(vm_map_t map, vm_offset_t min, vm_offset_t max) static void vm_map_entry_dispose(vm_map_t map, vm_map_entry_t entry) { - uma_zfree((map->system_map || !mapentzone) - ? kmapentzone : mapentzone, entry); + uma_zfree(map->system_map ? kmapentzone : mapentzone, entry); } /* @@ -519,10 +518,12 @@ vm_map_entry_create(vm_map_t map) { vm_map_entry_t new_entry; - new_entry = uma_zalloc((map->system_map || !mapentzone) ? - kmapentzone : mapentzone, M_WAITOK); + if (map->system_map) + new_entry = uma_zalloc(kmapentzone, M_NOWAIT); + else + new_entry = uma_zalloc(mapentzone, M_WAITOK); if (new_entry == NULL) - panic("vm_map_entry_create: kernel resources exhausted"); + panic("vm_map_entry_create: kernel resources exhausted"); return (new_entry); }