Deleted Added
full compact
64c64
< * $Id: vm_kern.c,v 1.49 1998/08/24 08:39:37 dfr Exp $
---
> * $Id: vm_kern.c,v 1.50 1998/09/04 08:06:57 dfr Exp $
184d183
< vm_page_flag_clear(mem, (PG_BUSY | PG_ZERO));
185a185,186
> vm_page_flag_clear(mem, PG_ZERO);
> vm_page_wakeup(mem);
202a204,205
> *
> * This routine may not block on kernel maps.
255,258c258
< * Allocate wired-down memory in the kernel's address map for the higher
< * level kernel memory allocator (kern/kern_malloc.c). We cannot use
< * kmem_alloc() because we may need to allocate memory at interrupt
< * level where we cannot block (canwait == FALSE).
---
> * kmem_malloc:
260,262c260,263
< * This routine has its own private kernel submap (kmem_map) and object
< * (kmem_object). This, combined with the fact that only malloc uses
< * this routine, ensures that we will never block in map or object waits.
---
> * Allocate wired-down memory in the kernel's address map for the higher
> * level kernel memory allocator (kern/kern_malloc.c). We cannot use
> * kmem_alloc() because we may need to allocate memory at interrupt
> * level where we cannot block (canwait == FALSE).
264,265c265,267
< * Note that this still only works in a uni-processor environment and
< * when called at splhigh().
---
> * This routine has its own private kernel submap (kmem_map) and object
> * (kmem_object). This, combined with the fact that only malloc uses
> * this routine, ensures that we will never block in map or object waits.
267,268c269,276
< * We don't worry about expanding the map (adding entries) since entries
< * for wired maps are statically allocated.
---
> * Note that this still only works in a uni-processor environment and
> * when called at splhigh().
> *
> * We don't worry about expanding the map (adding entries) since entries
> * for wired maps are statically allocated.
> *
> * NOTE: This routine is not supposed to block if M_NOWAIT is set, but
> * I have not verified that it actually does not block.
271c279
< kmem_malloc(map, size, waitflag)
---
> kmem_malloc(map, size, flags)
274c282
< boolean_t waitflag;
---
> int flags;
300c308
< if (waitflag == M_WAITOK)
---
> if ((flags & M_NOWAIT) == 0)
310a319,326
> /*
> * Note: if M_NOWAIT specified alone, allocate from
> * interrupt-safe queues only (just the free list). If
> * M_ASLEEP or M_USE_RESERVE is also specified, we can also
> * allocate from the cache. Neither of the latter two
> * flags may be specified from an interrupt since interrupts
> * are not allowed to mess with the cache queue.
> */
313c329,331
< (waitflag == M_NOWAIT) ? VM_ALLOC_INTERRUPT : VM_ALLOC_SYSTEM);
---
> ((flags & (M_NOWAIT|M_ASLEEP|M_USE_RESERVE)) == M_NOWAIT) ?
> VM_ALLOC_INTERRUPT :
> VM_ALLOC_SYSTEM);
321c339
< if (waitflag == M_WAITOK) {
---
> if ((flags & M_NOWAIT) == 0) {
332a351,353
> if (flags & M_ASLEEP) {
> VM_AWAIT;
> }
361a383,385
> /*
> * Because this is kernel_pmap, this call will not block.
> */
372c396
< * kmem_alloc_wait
---
> * kmem_alloc_wait:
376a401
> * This routine may block.
377a403
>
409c435
< * kmem_free_wakeup
---
> * kmem_free_wakeup:
427,430c453,458
< * Create the kernel map; insert a mapping covering kernel text, data, bss,
< * and all space allocated thus far (`boostrap' data). The new map will thus
< * map the range between VM_MIN_KERNEL_ADDRESS and `start' as allocated, and
< * the range between `start' and `end' as free.
---
> * kmem_init:
> *
> * Create the kernel map; insert a mapping covering kernel text,
> * data, bss, and all space allocated thus far (`boostrap' data). The
> * new map will thus map the range between VM_MIN_KERNEL_ADDRESS and
> * `start' as allocated, and the range between `start' and `end' as free.
431a460
>
447a477
>