Lines Matching refs:zone

98 	zs_zone_t *zone;  in zs_lookup_zone_byid()  local
100 for (zone = list_head(&u->zsu_zone_list); zone != NULL; in zs_lookup_zone_byid()
101 zone = list_next(&u->zsu_zone_list, zone)) { in zs_lookup_zone_byid()
102 if (zone->zsz_id == zid) in zs_lookup_zone_byid()
103 return (zone); in zs_lookup_zone_byid()
111 zs_zone_t *zone; in zs_lookup_zone_byname() local
113 for (zone = list_head(&u->zsu_zone_list); zone != NULL; in zs_lookup_zone_byname()
114 zone = list_next(&u->zsu_zone_list, zone)) { in zs_lookup_zone_byname()
115 if (strcmp(zone->zsz_name, name) == 0) in zs_lookup_zone_byname()
116 return (zone); in zs_lookup_zone_byname()
689 zs_zone_name(zs_zone_t *zone, char *name, size_t len) in zs_zone_name() argument
691 return (strlcpy(name, zone->zsz_name, len)); in zs_zone_name()
695 zs_zone_id(zs_zone_t *zone) in zs_zone_id() argument
697 return (zone->zsz_id); in zs_zone_id()
701 zs_zone_iptype(zs_zone_t *zone) in zs_zone_iptype() argument
703 return (zone->zsz_iptype); in zs_zone_iptype()
707 zs_zone_cputype(zs_zone_t *zone) in zs_zone_cputype() argument
709 return (zone->zsz_cputype); in zs_zone_cputype()
713 zs_zone_poolname(zs_zone_t *zone, char *name, size_t len) in zs_zone_poolname() argument
715 return (strlcpy(name, zone->zsz_pool, len)); in zs_zone_poolname()
719 zs_zone_psetname(zs_zone_t *zone, char *name, size_t len) in zs_zone_psetname() argument
721 return (strlcpy(name, zone->zsz_pset, len)); in zs_zone_psetname()
725 zs_zone_schedulers(zs_zone_t *zone) in zs_zone_schedulers() argument
727 return (zone->zsz_scheds); in zs_zone_schedulers()
774 zs_zone_cpu_shares(zs_zone_t *zone) in zs_zone_cpu_shares() argument
777 if ((zone->zsz_scheds & ZS_SCHED_FSS) == 0) in zs_zone_cpu_shares()
780 return (zone->zsz_cpu_shares); in zs_zone_cpu_shares()
784 zs_zone_cpu_cap(zs_zone_t *zone) in zs_zone_cpu_cap() argument
786 return (zone->zsz_cpu_cap); in zs_zone_cpu_cap()
790 zs_zone_cpu_cap_used(zs_zone_t *zone) in zs_zone_cpu_cap_used() argument
792 if (zone->zsz_cpu_cap == ZS_LIMIT_NONE) in zs_zone_cpu_cap_used()
795 return (zs_ts_used_cpus(&zone->zsz_cap_time, &zone->zsz_cpu_usage, in zs_zone_cpu_cap_used()
796 zone->zsz_cpus_online, B_TRUE)); in zs_zone_cpu_cap_used()
800 zs_zone_cpu_shares_used(zs_zone_t *zone) in zs_zone_cpu_shares_used() argument
802 if (zone->zsz_cpu_shares == ZS_LIMIT_NONE) in zs_zone_cpu_shares_used()
805 if (zone->zsz_cpu_shares == ZS_SHARES_UNLIMITED) in zs_zone_cpu_shares_used()
808 if ((zone->zsz_scheds & ZS_SCHED_FSS) == 0) in zs_zone_cpu_shares_used()
811 return (zs_ts_used_scale(&zone->zsz_share_time, &zone->zsz_cpu_usage, in zs_zone_cpu_shares_used()
812 zone->zsz_cpu_shares, B_FALSE)); in zs_zone_cpu_shares_used()
816 zs_zone_cpu_cap_time(zs_zone_t *zone, timestruc_t *ts) in zs_zone_cpu_cap_time() argument
818 *ts = zone->zsz_cap_time; in zs_zone_cpu_cap_time()
822 zs_zone_cpu_share_time(zs_zone_t *zone, timestruc_t *ts) in zs_zone_cpu_share_time() argument
824 *ts = zone->zsz_share_time; in zs_zone_cpu_share_time()
828 zs_zone_cpu_cap_time_used(zs_zone_t *zone, timestruc_t *ts) in zs_zone_cpu_cap_time_used() argument
830 *ts = zone->zsz_cpu_usage; in zs_zone_cpu_cap_time_used()
834 zs_zone_cpu_share_time_used(zs_zone_t *zone, timestruc_t *ts) in zs_zone_cpu_share_time_used() argument
836 *ts = zone->zsz_cpu_usage; in zs_zone_cpu_share_time_used()
872 zs_zone_cpu_cap_pct(zs_zone_t *zone) in zs_zone_cpu_cap_pct() argument
874 if (zone->zsz_cpu_cap == ZS_LIMIT_NONE) in zs_zone_cpu_cap_pct()
877 return (zs_ts_used_pct(&zone->zsz_cap_time, &zone->zsz_cpu_usage, in zs_zone_cpu_cap_pct()
882 zs_zone_cpu_shares_pct(zs_zone_t *zone) in zs_zone_cpu_shares_pct() argument
884 if (zone->zsz_cpu_shares == ZS_LIMIT_NONE) in zs_zone_cpu_shares_pct()
887 if (zone->zsz_cpu_shares == ZS_SHARES_UNLIMITED) in zs_zone_cpu_shares_pct()
890 if ((zone->zsz_scheds & ZS_SCHED_FSS) == 0) in zs_zone_cpu_shares_pct()
893 return (zs_ts_used_pct(&zone->zsz_share_time, &zone->zsz_cpu_usage, in zs_zone_cpu_shares_pct()
898 zs_zone_physical_memory_cap(zs_zone_t *zone) in zs_zone_physical_memory_cap() argument
900 return (zone->zsz_ram_cap); in zs_zone_physical_memory_cap()
904 zs_zone_virtual_memory_cap(zs_zone_t *zone) in zs_zone_virtual_memory_cap() argument
906 return (zone->zsz_vm_cap); in zs_zone_virtual_memory_cap()
910 zs_zone_locked_memory_cap(zs_zone_t *zone) in zs_zone_locked_memory_cap() argument
912 return (zone->zsz_locked_cap); in zs_zone_locked_memory_cap()
916 zs_zone_physical_memory_cap_used(zs_zone_t *zone) in zs_zone_physical_memory_cap_used() argument
918 if (zone->zsz_ram_cap == ZS_LIMIT_NONE) in zs_zone_physical_memory_cap_used()
921 return (zone->zsz_usage_ram); in zs_zone_physical_memory_cap_used()
925 zs_zone_virtual_memory_cap_used(zs_zone_t *zone) in zs_zone_virtual_memory_cap_used() argument
927 if (zone->zsz_vm_cap == ZS_LIMIT_NONE) in zs_zone_virtual_memory_cap_used()
930 return (zone->zsz_usage_vm); in zs_zone_virtual_memory_cap_used()
934 zs_zone_locked_memory_cap_used(zs_zone_t *zone) in zs_zone_locked_memory_cap_used() argument
936 if (zone->zsz_locked_cap == ZS_LIMIT_NONE) in zs_zone_locked_memory_cap_used()
939 return (zone->zsz_usage_locked); in zs_zone_locked_memory_cap_used()
1152 zs_zone_t *zone = pz->zspz_zone; in zs_pset_zone_usage_pct_cpu_cap() local
1154 if (zone->zsz_cpu_cap == ZS_LIMIT_NONE) { in zs_pset_zone_usage_pct_cpu_cap()
1157 return (zs_ts_used_pct(&zone->zsz_cap_time, in zs_pset_zone_usage_pct_cpu_cap()
1318 zs_cpu_usage_zone(zs_zone_t *zone, timestruc_t *ts) in zs_cpu_usage_zone() argument
1320 *ts = zone->zsz_cpu_usage; in zs_cpu_usage_zone()
1371 zs_cpu_usage_zone_cpu(zs_zone_t *zone) in zs_cpu_usage_zone_cpu() argument
1373 return (zs_ts_used_cpus(&zone->zsz_pset_time, &zone->zsz_cpu_usage, in zs_cpu_usage_zone_cpu()
1374 zone->zsz_cpus_online, B_TRUE)); in zs_cpu_usage_zone_cpu()
1378 zs_cpu_usage_zone_pct(zs_zone_t *zone) in zs_cpu_usage_zone_pct() argument
1380 return (zs_ts_used_pct(&zone->zsz_pset_time, &zone->zsz_cpu_usage, in zs_cpu_usage_zone_pct()
1452 zs_physical_memory_usage_zone(zs_zone_t *zone) in zs_physical_memory_usage_zone() argument
1454 return (zone->zsz_usage_ram); in zs_physical_memory_usage_zone()
1458 zs_physical_memory_usage_zone_pct(zs_zone_t *zone) in zs_physical_memory_usage_zone_pct() argument
1460 zs_system_t *system = zone->zsz_system; in zs_physical_memory_usage_zone_pct()
1463 zone->zsz_usage_ram, B_TRUE)); in zs_physical_memory_usage_zone_pct()
1467 zs_zone_physical_memory_cap_pct(zs_zone_t *zone) in zs_zone_physical_memory_cap_pct() argument
1469 if (zone->zsz_ram_cap == ZS_LIMIT_NONE) in zs_zone_physical_memory_cap_pct()
1472 if (zone->zsz_ram_cap == 0) { in zs_zone_physical_memory_cap_pct()
1477 return (zs_uint64_used_pct(zone->zsz_ram_cap, in zs_zone_physical_memory_cap_pct()
1478 zone->zsz_usage_ram, B_FALSE)); in zs_zone_physical_memory_cap_pct()
1546 zs_virtual_memory_usage_zone(zs_zone_t *zone) in zs_virtual_memory_usage_zone() argument
1548 return (zone->zsz_usage_vm); in zs_virtual_memory_usage_zone()
1552 zs_virtual_memory_usage_zone_pct(zs_zone_t *zone) in zs_virtual_memory_usage_zone_pct() argument
1554 zs_system_t *system = zone->zsz_system; in zs_virtual_memory_usage_zone_pct()
1557 zone->zsz_usage_vm, B_TRUE)); in zs_virtual_memory_usage_zone_pct()
1562 zs_zone_virtual_memory_cap_pct(zs_zone_t *zone) in zs_zone_virtual_memory_cap_pct() argument
1564 if (zone->zsz_vm_cap == ZS_LIMIT_NONE) in zs_zone_virtual_memory_cap_pct()
1567 if (zone->zsz_vm_cap == 0) in zs_zone_virtual_memory_cap_pct()
1570 return (zs_uint64_used_pct(zone->zsz_vm_cap, in zs_zone_virtual_memory_cap_pct()
1571 zone->zsz_usage_vm, B_TRUE)); in zs_zone_virtual_memory_cap_pct()
1641 zs_locked_memory_usage_zone(zs_zone_t *zone) in zs_locked_memory_usage_zone() argument
1643 return (zone->zsz_usage_locked); in zs_locked_memory_usage_zone()
1647 zs_locked_memory_usage_zone_pct(zs_zone_t *zone) in zs_locked_memory_usage_zone_pct() argument
1649 zs_system_t *system = zone->zsz_system; in zs_locked_memory_usage_zone_pct()
1652 zone->zsz_usage_locked, B_TRUE)); in zs_locked_memory_usage_zone_pct()
1656 zs_zone_locked_memory_cap_pct(zs_zone_t *zone) in zs_zone_locked_memory_cap_pct() argument
1658 if (zone->zsz_locked_cap == ZS_LIMIT_NONE) in zs_zone_locked_memory_cap_pct()
1661 if (zone->zsz_locked_cap == 0) in zs_zone_locked_memory_cap_pct()
1664 return (zs_uint64_used_pct(zone->zsz_locked_cap, in zs_zone_locked_memory_cap_pct()
1665 zone->zsz_usage_locked, B_TRUE)); in zs_zone_locked_memory_cap_pct()
1847 zs_processes_usage_zone(zs_zone_t *zone) in zs_processes_usage_zone() argument
1849 return (zone->zsz_processes); in zs_processes_usage_zone()
1853 zs_lwps_usage_zone(zs_zone_t *zone) in zs_lwps_usage_zone() argument
1855 return (zone->zsz_lwps); in zs_lwps_usage_zone()
1859 zs_shm_usage_zone(zs_zone_t *zone) in zs_shm_usage_zone() argument
1861 return (zone->zsz_shm); in zs_shm_usage_zone()
1865 zs_shmids_usage_zone(zs_zone_t *zone) in zs_shmids_usage_zone() argument
1867 return (zone->zsz_shmids); in zs_shmids_usage_zone()
1871 zs_semids_usage_zone(zs_zone_t *zone) in zs_semids_usage_zone() argument
1873 return (zone->zsz_semids); in zs_semids_usage_zone()
1877 zs_msgids_usage_zone(zs_zone_t *zone) in zs_msgids_usage_zone() argument
1879 return (zone->zsz_msgids); in zs_msgids_usage_zone()
1883 zs_lofi_usage_zone(zs_zone_t *zone) in zs_lofi_usage_zone() argument
1885 return (zone->zsz_lofi); in zs_lofi_usage_zone()
1889 zs_processes_usage_zone_pct(zs_zone_t *zone) in zs_processes_usage_zone_pct() argument
1891 zs_system_t *system = zone->zsz_system; in zs_processes_usage_zone_pct()
1894 zone->zsz_processes, B_TRUE)); in zs_processes_usage_zone_pct()
1898 zs_lwps_usage_zone_pct(zs_zone_t *zone) in zs_lwps_usage_zone_pct() argument
1900 zs_system_t *system = zone->zsz_system; in zs_lwps_usage_zone_pct()
1903 zone->zsz_lwps, B_TRUE)); in zs_lwps_usage_zone_pct()
1907 zs_shm_usage_zone_pct(zs_zone_t *zone) in zs_shm_usage_zone_pct() argument
1909 zs_system_t *system = zone->zsz_system; in zs_shm_usage_zone_pct()
1912 zone->zsz_shm, B_TRUE)); in zs_shm_usage_zone_pct()
1916 zs_shmids_usage_zone_pct(zs_zone_t *zone) in zs_shmids_usage_zone_pct() argument
1918 zs_system_t *system = zone->zsz_system; in zs_shmids_usage_zone_pct()
1921 zone->zsz_shmids, B_TRUE)); in zs_shmids_usage_zone_pct()
1925 zs_semids_usage_zone_pct(zs_zone_t *zone) in zs_semids_usage_zone_pct() argument
1927 zs_system_t *system = zone->zsz_system; in zs_semids_usage_zone_pct()
1930 zone->zsz_semids, B_TRUE)); in zs_semids_usage_zone_pct()
1934 zs_msgids_usage_zone_pct(zs_zone_t *zone) in zs_msgids_usage_zone_pct() argument
1936 zs_system_t *system = zone->zsz_system; in zs_msgids_usage_zone_pct()
1939 zone->zsz_msgids, B_TRUE)); in zs_msgids_usage_zone_pct()
1943 zs_lofi_usage_zone_pct(zs_zone_t *zone) in zs_lofi_usage_zone_pct() argument
1945 zs_system_t *system = zone->zsz_system; in zs_lofi_usage_zone_pct()
1948 zone->zsz_lofi, B_TRUE)); in zs_lofi_usage_zone_pct()
1952 zs_processes_zone_cap_pct(zs_zone_t *zone) in zs_processes_zone_cap_pct() argument
1954 if (zone->zsz_processes_cap == ZS_LIMIT_NONE) in zs_processes_zone_cap_pct()
1957 if (zone->zsz_processes_cap == 0) in zs_processes_zone_cap_pct()
1960 return (zs_uint64_used_pct(zone->zsz_processes_cap, in zs_processes_zone_cap_pct()
1961 zone->zsz_processes, B_TRUE)); in zs_processes_zone_cap_pct()
1965 zs_lwps_zone_cap_pct(zs_zone_t *zone) in zs_lwps_zone_cap_pct() argument
1967 if (zone->zsz_lwps_cap == ZS_LIMIT_NONE) in zs_lwps_zone_cap_pct()
1970 if (zone->zsz_lwps_cap == 0) in zs_lwps_zone_cap_pct()
1973 return (zs_uint64_used_pct(zone->zsz_lwps_cap, zone->zsz_lwps, B_TRUE)); in zs_lwps_zone_cap_pct()
1977 zs_shm_zone_cap_pct(zs_zone_t *zone) in zs_shm_zone_cap_pct() argument
1979 if (zone->zsz_shm_cap == ZS_LIMIT_NONE) in zs_shm_zone_cap_pct()
1982 if (zone->zsz_shm_cap == 0) in zs_shm_zone_cap_pct()
1985 return (zs_uint64_used_pct(zone->zsz_shm_cap, zone->zsz_shm, B_TRUE)); in zs_shm_zone_cap_pct()
1989 zs_shmids_zone_cap_pct(zs_zone_t *zone) in zs_shmids_zone_cap_pct() argument
1991 if (zone->zsz_shmids_cap == ZS_LIMIT_NONE) in zs_shmids_zone_cap_pct()
1994 if (zone->zsz_shmids_cap == 0) in zs_shmids_zone_cap_pct()
1997 return (zs_uint64_used_pct(zone->zsz_shmids_cap, zone->zsz_shmids, in zs_shmids_zone_cap_pct()
2002 zs_semids_zone_cap_pct(zs_zone_t *zone) in zs_semids_zone_cap_pct() argument
2004 if (zone->zsz_semids_cap == ZS_LIMIT_NONE) in zs_semids_zone_cap_pct()
2007 if (zone->zsz_semids_cap == 0) in zs_semids_zone_cap_pct()
2010 return (zs_uint64_used_pct(zone->zsz_semids_cap, zone->zsz_semids, in zs_semids_zone_cap_pct()
2015 zs_msgids_zone_cap_pct(zs_zone_t *zone) in zs_msgids_zone_cap_pct() argument
2017 if (zone->zsz_msgids_cap == ZS_LIMIT_NONE) in zs_msgids_zone_cap_pct()
2020 if (zone->zsz_msgids_cap == 0) in zs_msgids_zone_cap_pct()
2023 return (zs_uint64_used_pct(zone->zsz_msgids_cap, zone->zsz_msgids, in zs_msgids_zone_cap_pct()
2028 zs_lofi_zone_cap_pct(zs_zone_t *zone) in zs_lofi_zone_cap_pct() argument
2030 if (zone->zsz_lofi_cap == ZS_LIMIT_NONE) in zs_lofi_zone_cap_pct()
2033 if (zone->zsz_lofi_cap == 0) in zs_lofi_zone_cap_pct()
2036 return (zs_uint64_used_pct(zone->zsz_lofi_cap, zone->zsz_lofi, in zs_lofi_zone_cap_pct()
2062 zs_zone_t *zone = NULL; in zs_usage_read_internal() local
2110 zone = (zs_zone_t *)next; in zs_usage_read_internal()
2111 list_insert_tail(&usage->zsu_zone_list, zone); in zs_usage_read_internal()
2113 zone->zsz_system = usage->zsu_system; in zs_usage_read_internal()
2114 zone->zsz_intervals = 0; in zs_usage_read_internal()
2465 zs_zone_t *zone, *ztmp; in zs_usage_free() local
2474 zone = list_head(&usage->zsu_zone_list); in zs_usage_free()
2475 while (zone != NULL) { in zs_usage_free()
2476 ztmp = zone; in zs_usage_free()
2477 zone = list_next(&usage->zsu_zone_list, zone); in zs_usage_free()
3443 zs_zone_t *zone, *tmp; in zs_zone_list() local
3446 for (zone = list_head(&usage->zsu_zone_list); zone != NULL; in zs_zone_list()
3447 zone = list_next(&usage->zsu_zone_list, zone)) { in zs_zone_list()
3451 if (zone->zsz_id == GLOBAL_ZONEID) { in zs_zone_list()
3454 zonelist[0] = zone; in zs_zone_list()
3456 zonelist[i] = zone; in zs_zone_list()
3471 zs_zone_next(zs_usage_t *usage, zs_zone_t *zone) in zs_zone_next() argument
3473 return (list_next(&usage->zsu_zone_list, zone)); in zs_zone_next()
3481 zs_zone_property(zs_zone_t *zone, int prop, zs_property_t *p) in zs_zone_property() argument
3487 (void) zs_zone_name(zone, p->zsp_v.zsv_string, in zs_zone_property()
3493 p->zsp_v.zsv_int = zs_zone_id(zone); in zs_zone_property()
3498 p->zsp_v.zsv_uint = zs_zone_iptype(zone); in zs_zone_property()
3503 p->zsp_v.zsv_uint = zs_zone_cputype(zone); in zs_zone_property()
3508 p->zsp_v.zsv_uint = zs_zone_schedulers(zone); in zs_zone_property()
3513 p->zsp_v.zsv_uint64 = zs_zone_cpu_shares(zone); in zs_zone_property()
3518 (void) zs_zone_poolname(zone, p->zsp_v.zsv_string, in zs_zone_property()
3524 (void) zs_zone_psetname(zone, p->zsp_v.zsv_string, in zs_zone_property()
4002 zs_pset_zone_t *zone, *tmp; in zs_pset_zone_list() local
4005 for (zone = list_head(&pset->zsp_usage_list); zone != NULL; in zs_pset_zone_list()
4006 zone = list_next(&pset->zsp_usage_list, zone)) { in zs_pset_zone_list()
4010 if (zone->zspz_zone->zsz_id == GLOBAL_ZONEID) { in zs_pset_zone_list()
4013 zonelist[0] = zone; in zs_pset_zone_list()
4015 zonelist[i] = zone; in zs_pset_zone_list()