| /linux/drivers/block/null_blk/ |
| H A D | zoned.c | 27 struct nullb_zone *zone) in null_init_zone_lock() argument 30 spin_lock_init(&zone->spinlock); in null_init_zone_lock() 32 mutex_init(&zone->mutex); in null_init_zone_lock() 36 struct nullb_zone *zone) in null_lock_zone() argument 39 spin_lock_irq(&zone->spinlock); in null_lock_zone() 41 mutex_lock(&zone->mutex); in null_lock_zone() 45 struct nullb_zone *zone) in null_unlock_zone() argument 48 spin_unlock_irq(&zone->spinlock); in null_unlock_zone() 50 mutex_unlock(&zone->mutex); in null_unlock_zone() 57 struct nullb_zone *zone; in null_init_zoned_dev() local [all …]
|
| /linux/fs/pstore/ |
| H A D | zone.c | 160 static inline int buffer_datalen(struct pstore_zone *zone) in buffer_datalen() argument 162 return atomic_read(&zone->buffer->datalen); in buffer_datalen() 165 static inline int buffer_start(struct pstore_zone *zone) in buffer_start() argument 167 return atomic_read(&zone->buffer->start); in buffer_start() 175 static ssize_t psz_zone_read_buffer(struct pstore_zone *zone, char *buf, in psz_zone_read_buffer() argument 178 if (!buf || !zone || !zone->buffer) in psz_zone_read_buffer() 180 if (off > zone->buffer_size) in psz_zone_read_buffer() 182 len = min_t(size_t, len, zone->buffer_size - off); in psz_zone_read_buffer() 183 memcpy(buf, zone->buffer->data + off, len); in psz_zone_read_buffer() 187 static int psz_zone_read_oldbuf(struct pstore_zone *zone, char *buf, in psz_zone_read_oldbuf() argument [all …]
|
| /linux/mm/ |
| H A D | page_alloc.c | 218 struct zone *zone); 301 static bool cond_accept_memory(struct zone *zone, unsigned int order, 322 _deferred_grow_zone(struct zone *zone, unsigned int order) in _deferred_grow_zone() argument 324 return deferred_grow_zone(zone, order); in _deferred_grow_zone() 327 static inline bool _deferred_grow_zone(struct zone *zone, unsigned int order) in _deferred_grow_zone() argument 575 static int page_outside_zone_boundaries(struct zone *zone, struct page *page) in page_outside_zone_boundaries() argument 583 seq = zone_span_seqbegin(zone); in page_outside_zone_boundaries() 584 start_pfn = zone->zone_start_pfn; in page_outside_zone_boundaries() 585 sp = zone->spanned_pages; in page_outside_zone_boundaries() 586 ret = !zone_spans_pfn(zone, pfn); in page_outside_zone_boundaries() [all …]
|
| H A D | show_mem.c | 27 static inline void show_node(struct zone *zone) in show_node() argument 30 printk("Node %d ", zone_to_nid(zone)); in show_node() 39 struct zone *zone; in si_mem_available() local 41 for_each_zone(zone) in si_mem_available() 42 wmark_low += low_wmark_pages(zone); in si_mem_available() 99 struct zone *zone = &pgdat->node_zones[zone_type]; in si_meminfo_node() local 100 managed_pages += zone_managed_pages(zone); in si_meminfo_node() 101 if (is_highmem(zone)) { in si_meminfo_node() 102 managed_highpages += zone_managed_pages(zone); in si_meminfo_node() 103 free_highpages += zone_page_state(zone, NR_FREE_PAGES); in si_meminfo_node() [all …]
|
| H A D | vmstat.c | 41 static void zero_zone_numa_counters(struct zone *zone) in zero_zone_numa_counters() argument 46 atomic_long_set(&zone->vm_numa_event[item], 0); in zero_zone_numa_counters() 48 per_cpu_ptr(zone->per_cpu_zonestats, cpu)->vm_numa_event[item] in zero_zone_numa_counters() 57 struct zone *zone; in zero_zones_numa_counters() local 59 for_each_populated_zone(zone) in zero_zones_numa_counters() 60 zero_zone_numa_counters(zone); in zero_zones_numa_counters() 173 static void fold_vm_zone_numa_events(struct zone *zone) in fold_vm_zone_numa_events() argument 182 pzstats = per_cpu_ptr(zone->per_cpu_zonestats, cpu); in fold_vm_zone_numa_events() 188 zone_numa_event_add(zone_numa_events[item], zone, item); in fold_vm_zone_numa_events() 193 struct zone *zone; in fold_vm_numa_events() local [all …]
|
| H A D | mm_init.c | 84 struct zone *zone; in mminit_verify_zonelist() local 95 zone = &pgdat->node_zones[zoneid]; in mminit_verify_zonelist() 96 if (!populated_zone(zone)) in mminit_verify_zonelist() 102 zone->name); in mminit_verify_zonelist() 105 for_each_zone_zonelist(zone, z, zonelist, zoneid) in mminit_verify_zonelist() 106 pr_cont("%d:%s ", zone_to_nid(zone), zone->name); in mminit_verify_zonelist() 596 unsigned long zone, int nid) in __init_single_page() argument 599 set_page_links(page, zone, nid, pfn); in __init_single_page() 608 if (!is_highmem_idx(zone)) in __init_single_page() 761 struct zone *zone = &pgdat->node_zones[zid]; in __init_deferred_page() local [all …]
|
| H A D | page_reporting.c | 157 page_reporting_cycle(struct page_reporting_dev_info *prdev, struct zone *zone, in page_reporting_cycle() argument 161 struct free_area *area = &zone->free_area[order]; in page_reporting_cycle() 175 spin_lock_irq(&zone->lock); in page_reporting_cycle() 230 spin_unlock_irq(&zone->lock); in page_reporting_cycle() 242 spin_lock_irq(&zone->lock); in page_reporting_cycle() 262 spin_unlock_irq(&zone->lock); in page_reporting_cycle() 269 struct scatterlist *sgl, struct zone *zone) in page_reporting_process_zone() argument 276 watermark = low_wmark_pages(zone) + in page_reporting_process_zone() 283 if (!zone_watermark_ok(zone, 0, watermark, 0, ALLOC_CMA)) in page_reporting_process_zone() 293 err = page_reporting_cycle(prdev, zone, order, mt, in page_reporting_process_zone() [all …]
|
| /linux/drivers/block/ |
| H A D | zloop.c | 183 struct zloop_zone *zone) in zloop_lru_rotate_open_zone() argument 187 list_move_tail(&zone->open_zone_entry, in zloop_lru_rotate_open_zone() 194 struct zloop_zone *zone) in zloop_lru_remove_open_zone() argument 196 if (zone->cond == BLK_ZONE_COND_IMP_OPEN || in zloop_lru_remove_open_zone() 197 zone->cond == BLK_ZONE_COND_EXP_OPEN) { in zloop_lru_remove_open_zone() 199 list_del_init(&zone->open_zone_entry); in zloop_lru_remove_open_zone() 217 struct zloop_zone *zone; in zloop_close_imp_open_zone() local 224 list_for_each_entry(zone, &zlo->open_zones_lru_list, open_zone_entry) { in zloop_close_imp_open_zone() 225 if (zone->cond == BLK_ZONE_COND_IMP_OPEN) { in zloop_close_imp_open_zone() 226 zone->cond = BLK_ZONE_COND_CLOSED; in zloop_close_imp_open_zone() [all …]
|
| /linux/tools/power/cpupower/lib/ |
| H A D | powercap.c | 124 static int sysfs_powercap_get64_val(struct powercap_zone *zone, in sysfs_powercap_get64_val() argument 132 strcat(file, zone->sys_name); in sysfs_powercap_get64_val() 146 int powercap_get_max_energy_range_uj(struct powercap_zone *zone, uint64_t *val) in powercap_get_max_energy_range_uj() argument 148 return sysfs_powercap_get64_val(zone, GET_MAX_ENERGY_RANGE_UJ, val); in powercap_get_max_energy_range_uj() 151 int powercap_get_energy_uj(struct powercap_zone *zone, uint64_t *val) in powercap_get_energy_uj() argument 153 return sysfs_powercap_get64_val(zone, GET_ENERGY_UJ, val); in powercap_get_energy_uj() 156 int powercap_get_max_power_range_uw(struct powercap_zone *zone, uint64_t *val) in powercap_get_max_power_range_uw() argument 158 return sysfs_powercap_get64_val(zone, GET_MAX_POWER_RANGE_UW, val); in powercap_get_max_power_range_uw() 161 int powercap_get_power_uw(struct powercap_zone *zone, uint64_t *val) in powercap_get_power_uw() argument 163 return sysfs_powercap_get64_val(zone, GET_POWER_UW, val); in powercap_get_power_uw() [all …]
|
| H A D | powercap.h | 38 int powercap_walk_zones(struct powercap_zone *zone, 39 int (*f)(struct powercap_zone *zone)); 46 int powercap_get_max_energy_range_uj(struct powercap_zone *zone, uint64_t *val); 47 int powercap_get_energy_uj(struct powercap_zone *zone, uint64_t *val); 48 int powercap_get_max_power_range_uw(struct powercap_zone *zone, uint64_t *val); 49 int powercap_get_power_uw(struct powercap_zone *zone, uint64_t *val); 50 int powercap_zone_get_enabled(struct powercap_zone *zone, int *mode); 51 int powercap_zone_set_enabled(struct powercap_zone *zone, int mode);
|
| /linux/include/net/netfilter/ |
| H A D | nf_conntrack_zones.h | 12 return &ct->zone; in nf_ct_zone() 19 nf_ct_zone_init(struct nf_conntrack_zone *zone, u16 id, u8 dir, u8 flags) in nf_ct_zone_init() argument 21 zone->id = id; in nf_ct_zone_init() 22 zone->flags = flags; in nf_ct_zone_init() 23 zone->dir = dir; in nf_ct_zone_init() 25 return zone; in nf_ct_zone_init() 36 if (tmpl->zone.flags & NF_CT_FLAG_MARK) in nf_ct_zone_tmpl() 37 return nf_ct_zone_init(tmp, skb->mark, tmpl->zone.dir, 0); in nf_ct_zone_tmpl() 43 const struct nf_conntrack_zone *zone) in nf_ct_zone_add() argument 46 ct->zone = *zone; in nf_ct_zone_add() [all …]
|
| /linux/include/linux/ |
| H A D | mmzone.h | 180 #define for_each_free_list(list, zone, order) \ argument 184 (list = &(zone)->free_area[order].free_list[__type], 1); \ 979 struct zone { struct 1180 static inline unsigned long wmark_pages(const struct zone *z, in wmark_pages() 1186 static inline unsigned long min_wmark_pages(const struct zone *z) in min_wmark_pages() 1191 static inline unsigned long low_wmark_pages(const struct zone *z) in low_wmark_pages() 1196 static inline unsigned long high_wmark_pages(const struct zone *z) in high_wmark_pages() 1201 static inline unsigned long promo_wmark_pages(const struct zone *z) in promo_wmark_pages() 1206 static inline unsigned long zone_managed_pages(const struct zone *zone) in zone_managed_pages() argument 1208 return (unsigned long)atomic_long_read(&zone->managed_pages); in zone_managed_pages() [all …]
|
| H A D | vmstat.h | 141 static inline void zone_numa_event_add(long x, struct zone *zone, in zone_numa_event_add() argument 144 atomic_long_add(x, &zone->vm_numa_event[item]); in zone_numa_event_add() 148 static inline unsigned long zone_numa_event_state(struct zone *zone, in zone_numa_event_state() argument 151 return atomic_long_read(&zone->vm_numa_event[item]); in zone_numa_event_state() 161 static inline void zone_page_state_add(long x, struct zone *zone, in zone_page_state_add() argument 164 atomic_long_add(x, &zone->vm_stat[item]); in zone_page_state_add() 216 static inline unsigned long zone_page_state(struct zone *zone, in zone_page_state() argument 219 long x = atomic_long_read(&zone->vm_stat[item]); in zone_page_state() 233 static inline unsigned long zone_page_state_snapshot(struct zone *zone, in zone_page_state_snapshot() argument 236 long x = atomic_long_read(&zone->vm_stat[item]); in zone_page_state_snapshot() [all …]
|
| /linux/fs/adfs/ |
| H A D | map.c | 159 static int scan_map(struct adfs_sb_info *asb, unsigned int zone, in scan_map() argument 166 dm = asb->s_map + zone; in scan_map() 167 zone = asb->s_map_size; in scan_map() 168 dm_end = asb->s_map + zone; in scan_map() 179 } while (--zone > 0); in scan_map() 202 unsigned int zone; in adfs_map_statfs() local 205 zone = asb->s_map_size; in adfs_map_statfs() 209 } while (--zone > 0); in adfs_map_statfs() 220 unsigned int zone, mapoff; in adfs_map_lookup() local 228 zone = asb->s_map_size >> 1; in adfs_map_lookup() [all …]
|
| /linux/virt/kvm/ |
| H A D | coalesced_mmio.c | 36 if (addr < dev->zone.addr) in coalesced_mmio_in_range() 38 if (addr + len > dev->zone.addr + dev->zone.size) in coalesced_mmio_in_range() 74 ring->coalesced_mmio[insert].pio = dev->zone.pio; in coalesced_mmio_write() 123 struct kvm_coalesced_mmio_zone *zone) in kvm_vm_ioctl_register_coalesced_mmio() argument 128 if (zone->pio != 1 && zone->pio != 0) in kvm_vm_ioctl_register_coalesced_mmio() 137 dev->zone = *zone; in kvm_vm_ioctl_register_coalesced_mmio() 141 zone->pio ? KVM_PIO_BUS : KVM_MMIO_BUS, in kvm_vm_ioctl_register_coalesced_mmio() 142 zone->addr, zone->size, &dev->dev); in kvm_vm_ioctl_register_coalesced_mmio() 158 struct kvm_coalesced_mmio_zone *zone) in kvm_vm_ioctl_unregister_coalesced_mmio() argument 163 if (zone->pio != 1 && zone->pio != 0) in kvm_vm_ioctl_unregister_coalesced_mmio() [all …]
|
| /linux/drivers/net/ethernet/mellanox/mlx4/ |
| H A D | alloc.c | 250 struct mlx4_zone_entry *zone = kmalloc_obj(*zone); in mlx4_zone_add_one() local 252 if (NULL == zone) in mlx4_zone_add_one() 255 zone->flags = flags; in mlx4_zone_add_one() 256 zone->bitmap = bitmap; in mlx4_zone_add_one() 257 zone->use_rr = (flags & MLX4_ZONE_USE_RR) ? MLX4_USE_RR : 0; in mlx4_zone_add_one() 258 zone->priority = priority; in mlx4_zone_add_one() 259 zone->offset = offset; in mlx4_zone_add_one() 263 zone->uid = zone_alloc->last_uid++; in mlx4_zone_add_one() 264 zone->allocator = zone_alloc; in mlx4_zone_add_one() 274 list_add_tail(&zone->prio_list, &it->prio_list); in mlx4_zone_add_one() [all …]
|
| /linux/include/trace/events/ |
| H A D | compaction.h | 194 TP_PROTO(struct zone *zone, 198 TP_ARGS(zone, order, ret), 208 __entry->nid = zone_to_nid(zone); 209 __entry->idx = zone_idx(zone); 223 TP_PROTO(struct zone *zone, 227 TP_ARGS(zone, order, ret) 232 TP_PROTO(struct zone *zone, 236 TP_ARGS(zone, order, ret) 241 TP_PROTO(struct zone *zone, int order), 243 TP_ARGS(zone, order), [all …]
|
| /linux/drivers/md/ |
| H A D | dm-zoned-target.c | 21 struct dm_zone *zone; member 86 struct dm_zone *zone = bioctx->zone; in dmz_bio_endio() local 88 if (zone) { in dmz_bio_endio() 91 dmz_is_seq(zone)) in dmz_bio_endio() 92 set_bit(DMZ_SEQ_WRITE_ERR, &zone->flags); in dmz_bio_endio() 93 dmz_deactivate_zone(zone); in dmz_bio_endio() 116 static int dmz_submit_bio(struct dmz_target *dmz, struct dm_zone *zone, in dmz_submit_bio() argument 122 struct dmz_dev *dev = zone->dev; in dmz_submit_bio() 134 dmz_start_sect(dmz->metadata, zone) + dmz_blk2sect(chunk_block); in dmz_submit_bio() 144 if (bio_op(bio) == REQ_OP_WRITE && dmz_is_seq(zone)) in dmz_submit_bio() [all …]
|
| H A D | raid0.c | 71 struct strip_zone *zone; in create_strip_zones() local 160 zone = &conf->strip_zone[0]; in create_strip_zones() 208 zone->nb_dev = cnt; in create_strip_zones() 209 zone->zone_end = smallest->sectors * cnt; in create_strip_zones() 211 curr_zone_end = zone->zone_end; in create_strip_zones() 218 zone = conf->strip_zone + i; in create_strip_zones() 222 zone->dev_start = smallest->sectors; in create_strip_zones() 228 if (rdev->sectors <= zone->dev_start) { in create_strip_zones() 248 zone->nb_dev = c; in create_strip_zones() 249 sectors = (smallest->sectors - zone->dev_start) * c; in create_strip_zones() [all …]
|
| /linux/Documentation/filesystems/ |
| H A D | zonefs.rst | 10 zonefs is a very simple file system exposing each zone of a zoned block device 24 by allowing SSTables to be stored in a zone file similarly to a regular file 26 of the higher level construct "one file is one zone" can help reducing the 34 space that is divided into zones. A zone is a group of consecutive LBAs and all 41 sequentially. Each sequential zone has a write pointer maintained by the 43 to the device. As a result of this write constraint, LBAs in a sequential zone 45 command (zone reset) before rewriting. 61 representing zones are grouped by zone type, which are themselves represented 62 by sub-directories. This file structure is built entirely using zone information 71 mount, zonefs uses blkdev_report_zones() to obtain the device zone configuration [all …]
|
| /linux/block/ |
| H A D | blk-zoned.c | 354 static int blkdev_copy_zone_to_user(struct blk_zone *zone, unsigned int idx, in blkdev_copy_zone_to_user() argument 359 if (copy_to_user(&args->zones[idx], zone, sizeof(struct blk_zone))) in blkdev_copy_zone_to_user() 490 static bool disk_zone_is_last(struct gendisk *disk, struct blk_zone *zone) in disk_zone_is_last() argument 492 return zone->start + zone->len >= get_capacity(disk); in disk_zone_is_last() 796 static unsigned int blk_zone_wp_offset(struct blk_zone *zone) in blk_zone_wp_offset() argument 798 switch (zone->cond) { in blk_zone_wp_offset() 803 return zone->wp - zone->start; in blk_zone_wp_offset() 820 struct blk_zone *zone) in disk_zone_wplug_sync_wp_offset() argument 823 unsigned int wp_offset = blk_zone_wp_offset(zone); in disk_zone_wplug_sync_wp_offset() 825 zwplug = disk_get_zone_wplug(disk, zone->start); in disk_zone_wplug_sync_wp_offset() [all …]
|
| /linux/sound/synth/emux/ |
| H A D | soundfont.c | 476 struct snd_sf_zone *zone; in load_info() local 515 for (zone = sf->zones; zone; zone = zone->next) { in load_info() 516 if (!zone->mapped && in load_info() 517 zone->bank == hdr.bank && in load_info() 518 zone->instr == hdr.instr) in load_info() 547 zone = sf_zone_new(sflist, sf); in load_info() 548 if (!zone) in load_info() 552 zone->bank = tmpzone.bank; in load_info() 553 zone->instr = tmpzone.instr; in load_info() 554 zone->v = tmpzone.v; in load_info() [all …]
|
| /linux/drivers/thermal/intel/int340x_thermal/ |
| H A D | int340x_thermal_zone.c | 14 static int int340x_thermal_get_zone_temp(struct thermal_zone_device *zone, in int340x_thermal_get_zone_temp() argument 17 struct int34x_thermal_zone *d = thermal_zone_device_priv(zone); in int340x_thermal_get_zone_temp() 41 static int int340x_thermal_set_trip_temp(struct thermal_zone_device *zone, in int340x_thermal_set_trip_temp() argument 44 struct int34x_thermal_zone *d = thermal_zone_device_priv(zone); in int340x_thermal_set_trip_temp() 60 static void int340x_thermal_critical(struct thermal_zone_device *zone) in int340x_thermal_critical() argument 62 dev_dbg(thermal_zone_device(zone), "%s: critical temperature reached\n", in int340x_thermal_critical() 63 thermal_zone_device_type(zone)); in int340x_thermal_critical() 163 int34x_zone->zone = thermal_zone_device_register_with_trips( in int340x_thermal_zone_add() 172 if (IS_ERR(int34x_zone->zone)) { in int340x_thermal_zone_add() 173 ret = PTR_ERR(int34x_zone->zone); in int340x_thermal_zone_add() [all …]
|
| /linux/Documentation/ABI/testing/ |
| H A D | sysfs-class-powercap | 25 This status affects every power zone using this "control_type. 27 What: /sys/class/powercap/<control type>/<power zone> 32 A power zone is a single or a collection of devices, which can 33 be independently monitored and controlled. A power zone sysfs 37 What: /sys/class/powercap/<control type>/<power zone>/<child power zone> 45 power zone for a whole CPU package, each CPU core in it can 46 be a child power zone. 48 What: /sys/class/powercap/.../<power zone>/name 53 Specifies the name of this power zone. 55 What: /sys/class/powercap/.../<power zone>/energy_uj [all …]
|
| H A D | sysfs-class-backlight | 88 What: /sys/class/backlight/<backlight>/<ambient light zone>_max 93 Control the maximum brightness for <ambient light zone> 96 <ambient light zone>. 98 The <ambient light zone> is device-driver specific: 100 For ADP5520 and ADP5501, <ambient light zone> can be: 104 light zone 111 For ADP8860, <ambient light zone> can be: 115 light zone 122 For ADP8870, <ambient light zone> can be: 126 light zone [all …]
|