Lines Matching refs:zone
385 vmu_zone_t *zone = (vmu_zone_t *)val; in vmu_free_zone() local
387 if (zone->vmz_zone != NULL) { in vmu_free_zone()
388 vmu_free_entity((mod_hash_val_t)zone->vmz_zone); in vmu_free_zone()
389 zone->vmz_zone = NULL; in vmu_free_zone()
391 if (zone->vmz_projects_hash != NULL) in vmu_free_zone()
392 i_mod_hash_clear_nosync(zone->vmz_projects_hash); in vmu_free_zone()
393 if (zone->vmz_tasks_hash != NULL) in vmu_free_zone()
394 i_mod_hash_clear_nosync(zone->vmz_tasks_hash); in vmu_free_zone()
395 if (zone->vmz_rusers_hash != NULL) in vmu_free_zone()
396 i_mod_hash_clear_nosync(zone->vmz_rusers_hash); in vmu_free_zone()
397 if (zone->vmz_eusers_hash != NULL) in vmu_free_zone()
398 i_mod_hash_clear_nosync(zone->vmz_eusers_hash); in vmu_free_zone()
399 zone->vmz_next = vmu_data.vmu_free_zones; in vmu_free_zone()
400 vmu_data.vmu_free_zones = zone; in vmu_free_zone()
507 vmu_zone_t *zone; in vmu_alloc_zone() local
510 zone = vmu_data.vmu_free_zones; in vmu_alloc_zone()
513 zone->vmz_next = NULL; in vmu_alloc_zone()
514 zone->vmz_zone = NULL; in vmu_alloc_zone()
516 zone = kmem_zalloc(sizeof (vmu_zone_t), KM_SLEEP); in vmu_alloc_zone()
519 zone->vmz_id = id; in vmu_alloc_zone()
522 zone->vmz_zone = vmu_alloc_entity(id, VMUSAGE_ZONE, id); in vmu_alloc_zone()
525 VMUSAGE_ALL_PROJECTS)) != 0 && zone->vmz_projects_hash == NULL) in vmu_alloc_zone()
526 zone->vmz_projects_hash = mod_hash_create_idhash( in vmu_alloc_zone()
530 != 0 && zone->vmz_tasks_hash == NULL) in vmu_alloc_zone()
531 zone->vmz_tasks_hash = mod_hash_create_idhash( in vmu_alloc_zone()
535 != 0 && zone->vmz_rusers_hash == NULL) in vmu_alloc_zone()
536 zone->vmz_rusers_hash = mod_hash_create_idhash( in vmu_alloc_zone()
540 != 0 && zone->vmz_eusers_hash == NULL) in vmu_alloc_zone()
541 zone->vmz_eusers_hash = mod_hash_create_idhash( in vmu_alloc_zone()
544 return (zone); in vmu_alloc_zone()
1453 vmu_zone_t *zone; in vmu_calculate_proc() local
1472 (mod_hash_val_t *)&zone); in vmu_calculate_proc()
1474 zone = vmu_alloc_zone(p->p_zone->zone_id); in vmu_calculate_proc()
1477 (mod_hash_val_t)zone, (mod_hash_hndl_t)0); in vmu_calculate_proc()
1480 if (zone->vmz_zone != NULL) { in vmu_calculate_proc()
1481 tmp = zone->vmz_zone; in vmu_calculate_proc()
1487 tmp = vmu_find_insert_entity(zone->vmz_projects_hash, in vmu_calculate_proc()
1489 zone->vmz_id); in vmu_calculate_proc()
1495 tmp = vmu_find_insert_entity(zone->vmz_tasks_hash, in vmu_calculate_proc()
1496 p->p_task->tk_tkid, VMUSAGE_TASKS, zone->vmz_id); in vmu_calculate_proc()
1502 tmp = vmu_find_insert_entity(zone->vmz_rusers_hash, in vmu_calculate_proc()
1503 crgetruid(p->p_cred), VMUSAGE_RUSERS, zone->vmz_id); in vmu_calculate_proc()
1509 tmp = vmu_find_insert_entity(zone->vmz_eusers_hash, in vmu_calculate_proc()
1510 crgetuid(p->p_cred), VMUSAGE_EUSERS, zone->vmz_id); in vmu_calculate_proc()