/kernel/linux/linux-5.10/drivers/gpu/drm/ttm/ |
D | ttm_memory.c | 81 struct ttm_mem_zone *zone = in ttm_mem_zone_kobj_release() local 85 zone->name, (unsigned long long)zone->used_mem >> 10); in ttm_mem_zone_kobj_release() 86 kfree(zone); in ttm_mem_zone_kobj_release() 93 struct ttm_mem_zone *zone = in ttm_mem_zone_show() local 97 spin_lock(&zone->glob->lock); in ttm_mem_zone_show() 99 val = zone->zone_mem; in ttm_mem_zone_show() 101 val = zone->emer_mem; in ttm_mem_zone_show() 103 val = zone->max_mem; in ttm_mem_zone_show() 105 val = zone->swap_limit; in ttm_mem_zone_show() 107 val = zone->used_mem; in ttm_mem_zone_show() [all …]
|
/kernel/linux/linux-5.10/fs/pstore/ |
D | zone.c | 164 static inline int buffer_datalen(struct pstore_zone *zone) in buffer_datalen() argument 166 return atomic_read(&zone->buffer->datalen); in buffer_datalen() 169 static inline int buffer_start(struct pstore_zone *zone) in buffer_start() argument 171 return atomic_read(&zone->buffer->start); in buffer_start() 179 static ssize_t psz_zone_read_buffer(struct pstore_zone *zone, char *buf, in psz_zone_read_buffer() argument 182 if (!buf || !zone || !zone->buffer) in psz_zone_read_buffer() 184 if (off > zone->buffer_size) in psz_zone_read_buffer() 186 len = min_t(size_t, len, zone->buffer_size - off); in psz_zone_read_buffer() 187 memcpy(buf, zone->buffer->data + off, len); in psz_zone_read_buffer() 191 static int psz_zone_read_oldbuf(struct pstore_zone *zone, char *buf, in psz_zone_read_oldbuf() argument [all …]
|
/kernel/linux/linux-5.10/drivers/block/ |
D | null_blk_zoned.c | 91 struct blk_zone *zone = &dev->zones[i]; in null_init_zoned_dev() local 93 zone->start = sector; in null_init_zoned_dev() 94 zone->len = dev->zone_size_sects; in null_init_zoned_dev() 95 zone->capacity = zone->len; in null_init_zoned_dev() 96 zone->wp = zone->start + zone->len; in null_init_zoned_dev() 97 zone->type = BLK_ZONE_TYPE_CONVENTIONAL; in null_init_zoned_dev() 98 zone->cond = BLK_ZONE_COND_NOT_WP; in null_init_zoned_dev() 104 struct blk_zone *zone = &dev->zones[i]; in null_init_zoned_dev() local 106 zone->start = zone->wp = sector; in null_init_zoned_dev() 107 if (zone->start + dev->zone_size_sects > dev_capacity_sects) in null_init_zoned_dev() [all …]
|
/kernel/linux/linux-5.10/mm/ |
D | page_alloc.c | 137 struct zone *zone; member 592 static int page_outside_zone_boundaries(struct zone *zone, struct page *page) in page_outside_zone_boundaries() argument 600 seq = zone_span_seqbegin(zone); in page_outside_zone_boundaries() 601 start_pfn = zone->zone_start_pfn; in page_outside_zone_boundaries() 602 sp = zone->spanned_pages; in page_outside_zone_boundaries() 603 if (!zone_spans_pfn(zone, pfn)) in page_outside_zone_boundaries() 605 } while (zone_span_seqretry(zone, seq)); in page_outside_zone_boundaries() 609 pfn, zone_to_nid(zone), zone->name, in page_outside_zone_boundaries() 615 static int page_is_consistent(struct zone *zone, struct page *page) in page_is_consistent() argument 619 if (zone != page_zone(page)) in page_is_consistent() [all …]
|
D | compaction.c | 160 void defer_compaction(struct zone *zone, int order) in defer_compaction() argument 162 zone->compact_considered = 0; in defer_compaction() 163 zone->compact_defer_shift++; in defer_compaction() 165 if (order < zone->compact_order_failed) in defer_compaction() 166 zone->compact_order_failed = order; in defer_compaction() 168 if (zone->compact_defer_shift > COMPACT_MAX_DEFER_SHIFT) in defer_compaction() 169 zone->compact_defer_shift = COMPACT_MAX_DEFER_SHIFT; in defer_compaction() 171 trace_mm_compaction_defer_compaction(zone, order); in defer_compaction() 175 bool compaction_deferred(struct zone *zone, int order) in compaction_deferred() argument 177 unsigned long defer_limit = 1UL << zone->compact_defer_shift; in compaction_deferred() [all …]
|
D | memory_hotplug.c | 355 static unsigned long find_smallest_section_pfn(int nid, struct zone *zone, in find_smallest_section_pfn() argument 366 if (zone != page_zone(pfn_to_page(start_pfn))) in find_smallest_section_pfn() 376 static unsigned long find_biggest_section_pfn(int nid, struct zone *zone, in find_biggest_section_pfn() argument 391 if (zone != page_zone(pfn_to_page(pfn))) in find_biggest_section_pfn() 400 static void shrink_zone_span(struct zone *zone, unsigned long start_pfn, in shrink_zone_span() argument 404 int nid = zone_to_nid(zone); in shrink_zone_span() 406 zone_span_writelock(zone); in shrink_zone_span() 407 if (zone->zone_start_pfn == start_pfn) { in shrink_zone_span() 414 pfn = find_smallest_section_pfn(nid, zone, end_pfn, in shrink_zone_span() 415 zone_end_pfn(zone)); in shrink_zone_span() [all …]
|
D | vmstat.c | 40 static void zero_zone_numa_counters(struct zone *zone) in zero_zone_numa_counters() argument 45 atomic_long_set(&zone->vm_numa_stat[item], 0); in zero_zone_numa_counters() 47 per_cpu_ptr(zone->pageset, cpu)->vm_numa_stat_diff[item] in zero_zone_numa_counters() 55 struct zone *zone; in zero_zones_numa_counters() local 57 for_each_populated_zone(zone) in zero_zones_numa_counters() 58 zero_zone_numa_counters(zone); in zero_zones_numa_counters() 172 int calculate_pressure_threshold(struct zone *zone) in calculate_pressure_threshold() argument 185 watermark_distance = low_wmark_pages(zone) - min_wmark_pages(zone); in calculate_pressure_threshold() 196 int calculate_normal_threshold(struct zone *zone) in calculate_normal_threshold() argument 231 mem = zone_managed_pages(zone) >> (27 - PAGE_SHIFT); in calculate_normal_threshold() [all …]
|
D | page_isolation.c | 20 struct zone *zone = page_zone(page); in set_migratetype_isolate() local 24 spin_lock_irqsave(&zone->lock, flags); in set_migratetype_isolate() 32 spin_unlock_irqrestore(&zone->lock, flags); in set_migratetype_isolate() 40 unmovable = has_unmovable_pages(zone, page, migratetype, isol_flags); in set_migratetype_isolate() 46 zone->nr_isolate_pageblock++; in set_migratetype_isolate() 47 nr_pages = move_freepages_block(zone, page, MIGRATE_ISOLATE, in set_migratetype_isolate() 50 __mod_zone_freepage_state(zone, -nr_pages, mt); in set_migratetype_isolate() 51 spin_unlock_irqrestore(&zone->lock, flags); in set_migratetype_isolate() 52 drain_all_pages(zone); in set_migratetype_isolate() 56 spin_unlock_irqrestore(&zone->lock, flags); in set_migratetype_isolate() [all …]
|
D | mmzone.c | 30 struct zone *next_zone(struct zone *zone) in next_zone() argument 32 pg_data_t *pgdat = zone->zone_pgdat; in next_zone() 34 if (zone < pgdat->node_zones + MAX_NR_ZONES - 1) in next_zone() 35 zone++; in next_zone() 39 zone = pgdat->node_zones; in next_zone() 41 zone = NULL; in next_zone() 43 return zone; in next_zone() 69 (z->zone && !zref_in_nodemask(z, nodes))) in __next_zones_zonelist() 77 struct page *page, struct zone *zone) in memmap_valid_within() argument 82 if (page_zone(page) != zone) in memmap_valid_within()
|
/kernel/linux/linux-5.10/include/linux/ |
D | mmzone.h | 459 struct zone { struct 626 static inline unsigned long zone_managed_pages(struct zone *zone) in zone_managed_pages() argument 628 return (unsigned long)atomic_long_read(&zone->managed_pages); in zone_managed_pages() 631 static inline unsigned long zone_end_pfn(const struct zone *zone) in zone_end_pfn() argument 633 return zone->zone_start_pfn + zone->spanned_pages; in zone_end_pfn() 636 static inline bool zone_spans_pfn(const struct zone *zone, unsigned long pfn) in zone_spans_pfn() argument 638 return zone->zone_start_pfn <= pfn && pfn < zone_end_pfn(zone); in zone_spans_pfn() 641 static inline bool zone_is_initialized(struct zone *zone) in zone_is_initialized() argument 643 return zone->initialized; in zone_is_initialized() 646 static inline bool zone_is_empty(struct zone *zone) in zone_is_empty() argument [all …]
|
D | memory_hotplug.h | 11 struct zone; 91 static inline unsigned zone_span_seqbegin(struct zone *zone) in zone_span_seqbegin() argument 93 return read_seqbegin(&zone->span_seqlock); in zone_span_seqbegin() 95 static inline int zone_span_seqretry(struct zone *zone, unsigned iv) in zone_span_seqretry() argument 97 return read_seqretry(&zone->span_seqlock, iv); in zone_span_seqretry() 99 static inline void zone_span_writelock(struct zone *zone) in zone_span_writelock() argument 101 write_seqlock(&zone->span_seqlock); in zone_span_writelock() 103 static inline void zone_span_writeunlock(struct zone *zone) in zone_span_writeunlock() argument 105 write_sequnlock(&zone->span_seqlock); in zone_span_writeunlock() 107 static inline void zone_seqlock_init(struct zone *zone) in zone_seqlock_init() argument [all …]
|
D | vmstat.h | 145 static inline void zone_numa_state_add(long x, struct zone *zone, in zone_numa_state_add() argument 148 atomic_long_add(x, &zone->vm_numa_stat[item]); in zone_numa_state_add() 159 static inline unsigned long zone_numa_state_snapshot(struct zone *zone, in zone_numa_state_snapshot() argument 162 long x = atomic_long_read(&zone->vm_numa_stat[item]); in zone_numa_state_snapshot() 166 x += per_cpu_ptr(zone->pageset, cpu)->vm_numa_stat_diff[item]; in zone_numa_state_snapshot() 172 static inline void zone_page_state_add(long x, struct zone *zone, in zone_page_state_add() argument 175 atomic_long_add(x, &zone->vm_stat[item]); in zone_page_state_add() 214 static inline unsigned long zone_page_state(struct zone *zone, in zone_page_state() argument 217 long x = atomic_long_read(&zone->vm_stat[item]); in zone_page_state() 231 static inline unsigned long zone_page_state_snapshot(struct zone *zone, in zone_page_state_snapshot() argument [all …]
|
D | compaction.h | 91 extern unsigned int extfrag_for_order(struct zone *zone, unsigned int order); 92 extern int fragmentation_index(struct zone *zone, unsigned int order); 98 extern enum compact_result compaction_suitable(struct zone *zone, int order, 101 extern void defer_compaction(struct zone *zone, int order); 102 extern bool compaction_deferred(struct zone *zone, int order); 103 extern void compaction_defer_reset(struct zone *zone, int order, 105 extern bool compaction_restarting(struct zone *zone, int order); 191 static inline enum compact_result compaction_suitable(struct zone *zone, int order, in compaction_suitable() argument 197 static inline void defer_compaction(struct zone *zone, int order) in defer_compaction() argument 201 static inline bool compaction_deferred(struct zone *zone, int order) in compaction_deferred() argument
|
D | page-isolation.h | 6 static inline bool has_isolate_pageblock(struct zone *zone) in has_isolate_pageblock() argument 8 return zone->nr_isolate_pageblock; in has_isolate_pageblock() 19 static inline bool has_isolate_pageblock(struct zone *zone) in has_isolate_pageblock() argument 36 struct page *has_unmovable_pages(struct zone *zone, struct page *page, 39 int move_freepages_block(struct zone *zone, struct page *page,
|
/kernel/linux/linux-5.10/include/net/netfilter/ |
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 …]
|
/kernel/linux/linux-5.10/drivers/md/ |
D | dm-zoned-metadata.c | 137 struct dm_zone *zone; member 221 static unsigned int dmz_dev_zone_id(struct dmz_metadata *zmd, struct dm_zone *zone) in dmz_dev_zone_id() argument 223 if (WARN_ON(!zone)) in dmz_dev_zone_id() 226 return zone->id - zone->dev->zone_offset; in dmz_dev_zone_id() 229 sector_t dmz_start_sect(struct dmz_metadata *zmd, struct dm_zone *zone) in dmz_start_sect() argument 231 unsigned int zone_id = dmz_dev_zone_id(zmd, zone); in dmz_start_sect() 236 sector_t dmz_start_block(struct dmz_metadata *zmd, struct dm_zone *zone) in dmz_start_block() argument 238 unsigned int zone_id = dmz_dev_zone_id(zmd, zone); in dmz_start_block() 311 struct dm_zone *zone = kzalloc(sizeof(struct dm_zone), GFP_KERNEL); in dmz_insert() local 313 if (!zone) in dmz_insert() [all …]
|
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() 135 dmz_start_sect(dmz->metadata, zone) + dmz_blk2sect(chunk_block); in dmz_submit_bio() 145 if (bio_op(bio) == REQ_OP_WRITE && dmz_is_seq(zone)) in dmz_submit_bio() [all …]
|
/kernel/linux/linux-5.10/fs/btrfs/ |
D | reada.c | 229 struct reada_zone *zone; in reada_find_zone() local 235 zone = NULL; in reada_find_zone() 237 ret = radix_tree_gang_lookup(&dev->reada_zones, (void **)&zone, in reada_find_zone() 239 if (ret == 1 && logical >= zone->start && logical <= zone->end) { in reada_find_zone() 240 kref_get(&zone->refcnt); in reada_find_zone() 242 return zone; in reada_find_zone() 255 zone = kzalloc(sizeof(*zone), GFP_KERNEL); in reada_find_zone() 256 if (!zone) in reada_find_zone() 261 kfree(zone); in reada_find_zone() 265 zone->start = start; in reada_find_zone() [all …]
|
/kernel/linux/linux-5.10/kernel/power/ |
D | snapshot.c | 370 struct mem_zone_bm_rtree *zone; member 427 static int add_rtree_block(struct mem_zone_bm_rtree *zone, gfp_t gfp_mask, in add_rtree_block() argument 434 block_nr = zone->blocks; in add_rtree_block() 444 for (i = zone->levels; i < levels_needed; i++) { in add_rtree_block() 446 &zone->nodes); in add_rtree_block() 450 node->data[0] = (unsigned long)zone->rtree; in add_rtree_block() 451 zone->rtree = node; in add_rtree_block() 452 zone->levels += 1; in add_rtree_block() 456 block = alloc_rtree_node(gfp_mask, safe_needed, ca, &zone->leaves); in add_rtree_block() 461 node = zone->rtree; in add_rtree_block() [all …]
|
/kernel/linux/linux-5.10/fs/adfs/ |
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 …]
|
/kernel/linux/linux-5.10/drivers/thermal/tegra/ |
D | tegra-bpmp-thermal.c | 35 struct tegra_bpmp_thermal_zone *zone = data; in tegra_bpmp_thermal_get_temp() local 43 req.get_temp.zone = zone->idx; in tegra_bpmp_thermal_get_temp() 52 err = tegra_bpmp_transfer(zone->tegra->bpmp, &msg); in tegra_bpmp_thermal_get_temp() 63 struct tegra_bpmp_thermal_zone *zone = data; in tegra_bpmp_thermal_set_trips() local 69 req.set_trip.zone = zone->idx; in tegra_bpmp_thermal_set_trips() 79 return tegra_bpmp_transfer(zone->tegra->bpmp, &msg); in tegra_bpmp_thermal_set_trips() 84 struct tegra_bpmp_thermal_zone *zone; in tz_device_update_work_fn() local 86 zone = container_of(work, struct tegra_bpmp_thermal_zone, in tz_device_update_work_fn() 89 thermal_zone_device_update(zone->tzd, THERMAL_TRIP_VIOLATED); in tz_device_update_work_fn() 109 if (tegra->zones[i]->idx != req->host_trip_reached.zone) in bpmp_mrq_thermal() [all …]
|
/kernel/linux/linux-5.10/virt/kvm/ |
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() 89 ring->coalesced_mmio[insert].pio = dev->zone.pio; in coalesced_mmio_write() 138 struct kvm_coalesced_mmio_zone *zone) in kvm_vm_ioctl_register_coalesced_mmio() argument 143 if (zone->pio != 1 && zone->pio != 0) in kvm_vm_ioctl_register_coalesced_mmio() 153 dev->zone = *zone; in kvm_vm_ioctl_register_coalesced_mmio() 157 zone->pio ? KVM_PIO_BUS : KVM_MMIO_BUS, in kvm_vm_ioctl_register_coalesced_mmio() 158 zone->addr, zone->size, &dev->dev); in kvm_vm_ioctl_register_coalesced_mmio() 174 struct kvm_coalesced_mmio_zone *zone) in kvm_vm_ioctl_unregister_coalesced_mmio() argument 179 if (zone->pio != 1 && zone->pio != 0) in kvm_vm_ioctl_unregister_coalesced_mmio() [all …]
|
/kernel/linux/linux-5.10/include/trace/events/ |
D | compaction.h | 199 TP_PROTO(struct zone *zone, 203 TP_ARGS(zone, order, ret), 213 __entry->nid = zone_to_nid(zone); 214 __entry->idx = zone_idx(zone); 228 TP_PROTO(struct zone *zone, 232 TP_ARGS(zone, order, ret) 237 TP_PROTO(struct zone *zone, 241 TP_ARGS(zone, order, ret) 246 TP_PROTO(struct zone *zone, int order), 248 TP_ARGS(zone, order), [all …]
|
/kernel/linux/linux-5.10/drivers/net/ethernet/mellanox/mlx4/ |
D | alloc.c | 250 struct mlx4_zone_entry *zone = kmalloc(sizeof(*zone), GFP_KERNEL); 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 …]
|
/kernel/linux/linux-5.10/drivers/mtd/ |
D | sm_ftl.c | 192 static loff_t sm_mkoffset(struct sm_ftl *ftl, int zone, int block, int boffset) in sm_mkoffset() argument 195 WARN_ON(zone < 0 || zone >= ftl->zone_count); in sm_mkoffset() 202 return (zone * SM_MAX_ZONE_SIZE + block) * ftl->block_size + boffset; in sm_mkoffset() 207 int *zone, int *block, int *boffset) in sm_break_offset() argument 212 *zone = offset >= ftl->zone_count ? -1 : offset; in sm_break_offset() 239 int zone, int block, int boffset, in sm_read_sector() argument 270 if (zone == 0 && block == ftl->cis_block && boffset == in sm_read_sector() 281 ret = mtd_read_oob(mtd, sm_mkoffset(ftl, zone, block, boffset), &ops); in sm_read_sector() 286 block, zone, ret); in sm_read_sector() 304 " as bad" , block, zone); in sm_read_sector() [all …]
|