Subject: mb_map->lock.can_sleep
To: None <>
From: Gordon W. Ross <>
List: tech-kern
Date: 05/01/1994 21:41:39
What should be the state of the "lock.can_sleep" member of the maps:
mb_map and kmem_map ?  It appears to me that it should be FALSE, but
the initializations for these set it to TRUE, leading to the bogus
call to sleep described in my previous mail.

Either mb_map->lock.can_sleep must be zero, or else
vm_map_find() will need to pass the "cansleep" flag.

Initialization of mb_map is in <arch>/machdep.c :
mb_map = kmem_suballoc(kernel_map, &mbutl, &maxaddr, size, FALSE);

Then in vm/vm_kern.c:254, and this does:
result = vm_map_create(vm_map_pmap(parent), *min, *max, pageable);

Then in vm/vm_map.c:237, this does:
vm_map_init(result, min, max, pageable);

In the same file (line 264) this calls:
lock_init(&map->lock, TRUE);

Note that this makes mv_map->lock.can_sleep = TRUE
Is this correct?  If not, who should set it?