Home
last modified time | relevance | path

Searched refs:zone (Results 1 – 25 of 271) sorted by relevance

1234567891011

/Linux-v5.15/drivers/block/null_blk/
Dzoned.c32 struct nullb_zone *zone) in null_init_zone_lock() argument
35 spin_lock_init(&zone->spinlock); in null_init_zone_lock()
37 mutex_init(&zone->mutex); in null_init_zone_lock()
41 struct nullb_zone *zone) in null_lock_zone() argument
44 spin_lock_irq(&zone->spinlock); in null_lock_zone()
46 mutex_lock(&zone->mutex); in null_lock_zone()
50 struct nullb_zone *zone) in null_unlock_zone() argument
53 spin_unlock_irq(&zone->spinlock); in null_unlock_zone()
55 mutex_unlock(&zone->mutex); in null_unlock_zone()
61 struct nullb_zone *zone; in null_init_zoned_dev() local
[all …]
/Linux-v5.15/drivers/gpu/drm/vmwgfx/
Dttm_memory.c84 struct ttm_mem_zone *zone = in ttm_mem_zone_kobj_release() local
88 zone->name, (unsigned long long)zone->used_mem >> 10); in ttm_mem_zone_kobj_release()
89 kfree(zone); in ttm_mem_zone_kobj_release()
96 struct ttm_mem_zone *zone = in ttm_mem_zone_show() local
100 spin_lock(&zone->glob->lock); in ttm_mem_zone_show()
102 val = zone->zone_mem; in ttm_mem_zone_show()
104 val = zone->emer_mem; in ttm_mem_zone_show()
106 val = zone->max_mem; in ttm_mem_zone_show()
108 val = zone->swap_limit; in ttm_mem_zone_show()
110 val = zone->used_mem; in ttm_mem_zone_show()
[all …]
/Linux-v5.15/fs/pstore/
Dzone.c160 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-v5.15/include/linux/
Dmemory_hotplug.h11 struct zone;
81 static inline unsigned zone_span_seqbegin(struct zone *zone) in zone_span_seqbegin() argument
83 return read_seqbegin(&zone->span_seqlock); in zone_span_seqbegin()
85 static inline int zone_span_seqretry(struct zone *zone, unsigned iv) in zone_span_seqretry() argument
87 return read_seqretry(&zone->span_seqlock, iv); in zone_span_seqretry()
89 static inline void zone_span_writelock(struct zone *zone) in zone_span_writelock() argument
91 write_seqlock(&zone->span_seqlock); in zone_span_writelock()
93 static inline void zone_span_writeunlock(struct zone *zone) in zone_span_writeunlock() argument
95 write_sequnlock(&zone->span_seqlock); in zone_span_writeunlock()
97 static inline void zone_seqlock_init(struct zone *zone) in zone_seqlock_init() argument
[all …]
Dmmzone.h490 struct zone { struct
678 static inline unsigned long zone_managed_pages(struct zone *zone) in zone_managed_pages() argument
680 return (unsigned long)atomic_long_read(&zone->managed_pages); in zone_managed_pages()
683 static inline unsigned long zone_cma_pages(struct zone *zone) in zone_cma_pages() argument
686 return zone->cma_pages; in zone_cma_pages()
692 static inline unsigned long zone_end_pfn(const struct zone *zone) in zone_end_pfn() argument
694 return zone->zone_start_pfn + zone->spanned_pages; in zone_end_pfn()
697 static inline bool zone_spans_pfn(const struct zone *zone, unsigned long pfn) in zone_spans_pfn() argument
699 return zone->zone_start_pfn <= pfn && pfn < zone_end_pfn(zone); in zone_spans_pfn()
702 static inline bool zone_is_initialized(struct zone *zone) in zone_is_initialized() argument
[all …]
Dvmstat.h145 static inline void zone_numa_event_add(long x, struct zone *zone, in zone_numa_event_add() argument
148 atomic_long_add(x, &zone->vm_numa_event[item]); in zone_numa_event_add()
152 static inline unsigned long zone_numa_event_state(struct zone *zone, in zone_numa_event_state() argument
155 return atomic_long_read(&zone->vm_numa_event[item]); in zone_numa_event_state()
165 static inline void zone_page_state_add(long x, struct zone *zone, in zone_page_state_add() argument
168 atomic_long_add(x, &zone->vm_stat[item]); in zone_page_state_add()
207 static inline unsigned long zone_page_state(struct zone *zone, in zone_page_state() argument
210 long x = atomic_long_read(&zone->vm_stat[item]); in zone_page_state()
224 static inline unsigned long zone_page_state_snapshot(struct zone *zone, in zone_page_state_snapshot() argument
227 long x = atomic_long_read(&zone->vm_stat[item]); in zone_page_state_snapshot()
[all …]
Dpage-isolation.h6 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,
/Linux-v5.15/mm/
Dpage_alloc.c152 struct zone *zone; member
572 static int page_outside_zone_boundaries(struct zone *zone, struct page *page) in page_outside_zone_boundaries() argument
580 seq = zone_span_seqbegin(zone); in page_outside_zone_boundaries()
581 start_pfn = zone->zone_start_pfn; in page_outside_zone_boundaries()
582 sp = zone->spanned_pages; in page_outside_zone_boundaries()
583 if (!zone_spans_pfn(zone, pfn)) in page_outside_zone_boundaries()
585 } while (zone_span_seqretry(zone, seq)); in page_outside_zone_boundaries()
589 pfn, zone_to_nid(zone), zone->name, in page_outside_zone_boundaries()
595 static int page_is_consistent(struct zone *zone, struct page *page) in page_is_consistent() argument
597 if (zone != page_zone(page)) in page_is_consistent()
[all …]
Dvmstat.c38 static void zero_zone_numa_counters(struct zone *zone) in zero_zone_numa_counters() argument
43 atomic_long_set(&zone->vm_numa_event[item], 0); in zero_zone_numa_counters()
45 per_cpu_ptr(zone->per_cpu_zonestats, cpu)->vm_numa_event[item] in zero_zone_numa_counters()
54 struct zone *zone; in zero_zones_numa_counters() local
56 for_each_populated_zone(zone) in zero_zones_numa_counters()
57 zero_zone_numa_counters(zone); in zero_zones_numa_counters()
170 int calculate_pressure_threshold(struct zone *zone) in calculate_pressure_threshold() argument
183 watermark_distance = low_wmark_pages(zone) - min_wmark_pages(zone); in calculate_pressure_threshold()
194 int calculate_normal_threshold(struct zone *zone) in calculate_normal_threshold() argument
229 mem = zone_managed_pages(zone) >> (27 - PAGE_SHIFT); in calculate_normal_threshold()
[all …]
Dcompaction.c159 static void defer_compaction(struct zone *zone, int order) in defer_compaction() argument
161 zone->compact_considered = 0; in defer_compaction()
162 zone->compact_defer_shift++; in defer_compaction()
164 if (order < zone->compact_order_failed) in defer_compaction()
165 zone->compact_order_failed = order; in defer_compaction()
167 if (zone->compact_defer_shift > COMPACT_MAX_DEFER_SHIFT) in defer_compaction()
168 zone->compact_defer_shift = COMPACT_MAX_DEFER_SHIFT; in defer_compaction()
170 trace_mm_compaction_defer_compaction(zone, order); in defer_compaction()
174 static bool compaction_deferred(struct zone *zone, int order) in compaction_deferred() argument
176 unsigned long defer_limit = 1UL << zone->compact_defer_shift; in compaction_deferred()
[all …]
Dmemory_hotplug.c348 static unsigned long find_smallest_section_pfn(int nid, struct zone *zone, in find_smallest_section_pfn() argument
359 if (zone != page_zone(pfn_to_page(start_pfn))) in find_smallest_section_pfn()
369 static unsigned long find_biggest_section_pfn(int nid, struct zone *zone, in find_biggest_section_pfn() argument
384 if (zone != page_zone(pfn_to_page(pfn))) in find_biggest_section_pfn()
393 static void shrink_zone_span(struct zone *zone, unsigned long start_pfn, in shrink_zone_span() argument
397 int nid = zone_to_nid(zone); in shrink_zone_span()
399 if (zone->zone_start_pfn == start_pfn) { in shrink_zone_span()
406 pfn = find_smallest_section_pfn(nid, zone, end_pfn, in shrink_zone_span()
407 zone_end_pfn(zone)); in shrink_zone_span()
409 zone->spanned_pages = zone_end_pfn(zone) - pfn; in shrink_zone_span()
[all …]
Dpage_isolation.c20 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()
55 spin_unlock_irqrestore(&zone->lock, flags); in set_migratetype_isolate()
69 struct zone *zone; in unset_migratetype_isolate() local
[all …]
/Linux-v5.15/drivers/md/
Ddm-zoned-metadata.c137 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 …]
Ddm-zoned-target.c21 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 …]
/Linux-v5.15/include/net/netfilter/
Dnf_conntrack_zones.h12 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-v5.15/fs/btrfs/
Dreada.c234 struct reada_zone *zone; in reada_find_zone() local
240 zone = NULL; in reada_find_zone()
242 ret = radix_tree_gang_lookup(&dev->reada_zones, (void **)&zone, in reada_find_zone()
244 if (ret == 1 && logical >= zone->start && logical <= zone->end) { in reada_find_zone()
245 kref_get(&zone->refcnt); in reada_find_zone()
247 return zone; in reada_find_zone()
260 zone = kzalloc(sizeof(*zone), GFP_KERNEL); in reada_find_zone()
261 if (!zone) in reada_find_zone()
266 kfree(zone); in reada_find_zone()
270 zone->start = start; in reada_find_zone()
[all …]
/Linux-v5.15/kernel/power/
Dsnapshot.c404 struct mem_zone_bm_rtree *zone; member
461 static int add_rtree_block(struct mem_zone_bm_rtree *zone, gfp_t gfp_mask, in add_rtree_block() argument
468 block_nr = zone->blocks; in add_rtree_block()
478 for (i = zone->levels; i < levels_needed; i++) { in add_rtree_block()
480 &zone->nodes); in add_rtree_block()
484 node->data[0] = (unsigned long)zone->rtree; in add_rtree_block()
485 zone->rtree = node; in add_rtree_block()
486 zone->levels += 1; in add_rtree_block()
490 block = alloc_rtree_node(gfp_mask, safe_needed, ca, &zone->leaves); in add_rtree_block()
495 node = zone->rtree; in add_rtree_block()
[all …]
/Linux-v5.15/fs/adfs/
Dmap.c159 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-v5.15/drivers/thermal/tegra/
Dtegra-bpmp-thermal.c35 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 …]
/Linux-v5.15/virt/kvm/
Dcoalesced_mmio.c36 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 …]
/Linux-v5.15/drivers/net/ethernet/mellanox/mlx4/
Dalloc.c250 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 …]
/Linux-v5.15/include/trace/events/
Dcompaction.h199 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 …]
/Linux-v5.15/drivers/thermal/intel/int340x_thermal/
Dint340x_thermal_zone.c14 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 = zone->devdata; in int340x_thermal_get_zone_temp()
22 return d->override_ops->get_temp(zone, temp); in int340x_thermal_get_zone_temp()
43 static int int340x_thermal_get_trip_temp(struct thermal_zone_device *zone, in int340x_thermal_get_trip_temp() argument
46 struct int34x_thermal_zone *d = zone->devdata; in int340x_thermal_get_trip_temp()
50 return d->override_ops->get_trip_temp(zone, trip, temp); in int340x_thermal_get_trip_temp()
75 static int int340x_thermal_get_trip_type(struct thermal_zone_device *zone, in int340x_thermal_get_trip_type() argument
79 struct int34x_thermal_zone *d = zone->devdata; in int340x_thermal_get_trip_type()
83 return d->override_ops->get_trip_type(zone, trip, type); in int340x_thermal_get_trip_type()
108 static int int340x_thermal_set_trip_temp(struct thermal_zone_device *zone, in int340x_thermal_set_trip_temp() argument
[all …]
/Linux-v5.15/drivers/mtd/
Dsm_ftl.c192 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()
238 int zone, int block, int boffset, in sm_read_sector() argument
270 if (zone == 0 && block == ftl->cis_block && boffset == in sm_read_sector()
282 ret = mtd_read_oob(mtd, sm_mkoffset(ftl, zone, block, boffset), &ops); in sm_read_sector()
287 block, zone, ret); in sm_read_sector()
305 " as bad" , block, zone); in sm_read_sector()
[all …]
/Linux-v5.15/arch/x86/mm/
Dhighmem_32.c9 struct zone *zone; in set_highmem_pages_init() local
17 for_each_zone(zone) { in set_highmem_pages_init()
20 if (!is_highmem(zone)) in set_highmem_pages_init()
23 zone_start_pfn = zone->zone_start_pfn; in set_highmem_pages_init()
24 zone_end_pfn = zone_start_pfn + zone->spanned_pages; in set_highmem_pages_init()
26 nid = zone_to_nid(zone); in set_highmem_pages_init()
28 zone->name, nid, zone_start_pfn, zone_end_pfn); in set_highmem_pages_init()

1234567891011