summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2003-02-19 05:47:46 +0000
committerimp <imp@FreeBSD.org>2003-02-19 05:47:46 +0000
commitcf874b345d0f766fb64cf4737e1c85ccc78d2bee (patch)
tree9e20e320fe15ae4bf68f8335fcf9d3e71d3b3614 /sys/vm
parentb72619cecb8265d3efb3781b0acff1380762c173 (diff)
downloadFreeBSD-src-cf874b345d0f766fb64cf4737e1c85ccc78d2bee.zip
FreeBSD-src-cf874b345d0f766fb64cf4737e1c85ccc78d2bee.tar.gz
Back out M_* changes, per decision of the TRB.
Approved by: trb
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/device_pager.c2
-rw-r--r--sys/vm/swap_pager.c2
-rw-r--r--sys/vm/uma.h2
-rw-r--r--sys/vm/uma_core.c12
-rw-r--r--sys/vm/vm_map.c6
-rw-r--r--sys/vm/vm_object.c2
6 files changed, 13 insertions, 13 deletions
diff --git a/sys/vm/device_pager.c b/sys/vm/device_pager.c
index a0cf528..e7acedc 100644
--- a/sys/vm/device_pager.c
+++ b/sys/vm/device_pager.c
@@ -266,7 +266,7 @@ dev_pager_getfake(paddr)
{
vm_page_t m;
- m = uma_zalloc(fakepg_zone, 0);
+ m = uma_zalloc(fakepg_zone, M_WAITOK);
m->flags = PG_BUSY | PG_FICTITIOUS;
m->valid = VM_PAGE_BITS_ALL;
diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c
index 58568a2..0fb5d22 100644
--- a/sys/vm/swap_pager.c
+++ b/sys/vm/swap_pager.c
@@ -337,7 +337,7 @@ swap_pager_swap_init()
*/
for (n = 1; n < n2 / 8; n *= 2)
;
- swhash = malloc(sizeof(struct swblock *) * n, M_VMPGDATA, M_ZERO);
+ swhash = malloc(sizeof(struct swblock *) * n, M_VMPGDATA, M_WAITOK | M_ZERO);
swhash_mask = n - 1;
}
diff --git a/sys/vm/uma.h b/sys/vm/uma.h
index 988b79f..769d81a 100644
--- a/sys/vm/uma.h
+++ b/sys/vm/uma.h
@@ -209,7 +209,7 @@ void uma_zdestroy(uma_zone_t zone);
*
* Returns:
* A non null pointer to an initialized element from the zone is
- * garanteed if the wait flag is not M_NOWAIT, otherwise null may be
+ * garanteed if the wait flag is M_WAITOK, otherwise a null pointer may be
* returned if the zone is empty or the ctor failed.
*/
diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c
index e7c3f68..1fa83df 100644
--- a/sys/vm/uma_core.c
+++ b/sys/vm/uma_core.c
@@ -354,7 +354,7 @@ hash_alloc(struct uma_hash *hash)
} else {
alloc = sizeof(hash->uh_slab_hash[0]) * UMA_HASH_SIZE_INIT;
hash->uh_slab_hash = uma_zalloc_internal(hashzone, NULL,
- 0);
+ M_WAITOK);
hash->uh_hashsize = UMA_HASH_SIZE_INIT;
}
if (hash->uh_slab_hash) {
@@ -1300,7 +1300,7 @@ uma_zcreate(char *name, size_t size, uma_ctor ctor, uma_dtor dtor,
args.align = align;
args.flags = flags;
- return (uma_zalloc_internal(zones, &args, 0));
+ return (uma_zalloc_internal(zones, &args, M_WAITOK));
}
/* See uma.h */
@@ -1326,7 +1326,7 @@ uma_zalloc_arg(uma_zone_t zone, void *udata, int flags)
if (!(flags & M_NOWAIT)) {
KASSERT(curthread->td_intr_nesting_level == 0,
- ("malloc without M_NOWAIT in interrupt context"));
+ ("malloc(M_WAITOK) in interrupt context"));
WITNESS_SLEEP(1, NULL);
}
@@ -1609,7 +1609,7 @@ done:
* Arguments
* zone The zone to alloc for.
* udata The data to be passed to the constructor.
- * flags M_NOWAIT, M_ZERO.
+ * flags M_WAITOK, M_NOWAIT, M_ZERO.
*
* Returns
* NULL if there is no memory and M_NOWAIT is set
@@ -1964,7 +1964,7 @@ uma_prealloc(uma_zone_t zone, int items)
slabs++;
while (slabs > 0) {
- slab = slab_zalloc(zone, 0);
+ slab = slab_zalloc(zone, M_WAITOK);
LIST_INSERT_HEAD(&zone->uz_free_slab, slab, us_link);
slabs--;
}
@@ -2074,7 +2074,7 @@ sysctl_vm_zone(SYSCTL_HANDLER_ARGS)
cnt++;
mtx_unlock(&uma_mtx);
MALLOC(tmpbuf, char *, (cnt == 0 ? 1 : cnt) * linesize,
- M_TEMP, 0);
+ M_TEMP, M_WAITOK);
len = snprintf(tmpbuf, linesize,
"\nITEM SIZE LIMIT USED FREE REQUESTS\n\n");
if (cnt == 0)
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index 0882815..cd3b2e7 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -255,7 +255,7 @@ vmspace_alloc(min, max)
struct vmspace *vm;
GIANT_REQUIRED;
- vm = uma_zalloc(vmspace_zone, 0);
+ vm = uma_zalloc(vmspace_zone, M_WAITOK);
CTR1(KTR_VM, "vmspace_alloc: %p", vm);
_vm_map_init(&vm->vm_map, min, max);
pmap_pinit(vmspace_pmap(vm));
@@ -513,7 +513,7 @@ vm_map_create(pmap_t pmap, vm_offset_t min, vm_offset_t max)
{
vm_map_t result;
- result = uma_zalloc(mapzone, 0);
+ result = uma_zalloc(mapzone, M_WAITOK);
CTR1(KTR_VM, "vm_map_create: %p", result);
_vm_map_init(result, min, max);
result->pmap = pmap;
@@ -572,7 +572,7 @@ vm_map_entry_create(vm_map_t map)
if (map->system_map)
new_entry = uma_zalloc(kmapentzone, M_NOWAIT);
else
- new_entry = uma_zalloc(mapentzone, 0);
+ new_entry = uma_zalloc(mapentzone, M_WAITOK);
if (new_entry == NULL)
panic("vm_map_entry_create: kernel resources exhausted");
return (new_entry);
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c
index 5f4a04c..2fe605d 100644
--- a/sys/vm/vm_object.c
+++ b/sys/vm/vm_object.c
@@ -353,7 +353,7 @@ vm_object_allocate_wait(objtype_t type, vm_pindex_t size, int flags)
vm_object_t
vm_object_allocate(objtype_t type, vm_pindex_t size)
{
- return(vm_object_allocate_wait(type, size, 0));
+ return(vm_object_allocate_wait(type, size, M_WAITOK));
}
OpenPOWER on IntegriCloud