Lines Matching +full:indexed +full:- +full:array

1 // SPDX-License-Identifier: GPL-2.0-only
3 * mm/percpu-vm.c - vmalloc area based chunk allocation
16 /* must not be used on pre-mapped chunk */
17 WARN_ON(chunk->immutable);
23 * pcpu_get_pages - get temp pages array
25 * Returns pointer to array of pointers to struct page which can be indexed
26 * with pcpu_page_idx(). Note that there is only one array and accesses
30 * Pointer to temp pages array on success.
45 * pcpu_free_pages - free pages which were allocated for @chunk
47 * @pages: array of pages to be freed, indexed by pcpu_page_idx()
71 * pcpu_alloc_pages - allocates pages for @chunk
73 * @pages: array to put the allocated pages into, indexed by pcpu_page_idx()
103 while (--i >= page_start)
112 return -ENOMEM;
116 * pcpu_pre_unmap_flush - flush cache prior to unmapping
141 * pcpu_unmap_pages - unmap pages out of a pcpu_chunk
143 * @pages: pages array which can be used to pass information to free
168 page_end - page_start);
173 * pcpu_post_unmap_tlb_flush - flush TLB after unmapping
201 * pcpu_map_pages - map pages into a pcpu_chunk
203 * @pages: pages array containing pages to be mapped
212 * reverse lookup (addr -> chunk).
223 page_end - page_start);
235 page_end - page_start);
244 * pcpu_post_map_flush - flush cache after mapping
264 * pcpu_populate_chunk - populate and map an area of a pcpu_chunk
283 return -ENOMEM;
286 return -ENOMEM;
290 return -ENOMEM;
298 * pcpu_depopulate_chunk - depopulate and unmap an area of a pcpu_chunk
319 * successful population attempt so the temp pages array must
349 chunk->data = vms;
350 chunk->base_addr = vms[0]->addr - pcpu_group_offsets[0];
353 trace_percpu_create_chunk(chunk->base_addr);
364 trace_percpu_destroy_chunk(chunk->base_addr);
366 if (chunk->data)
367 pcpu_free_vm_areas(chunk->data, pcpu_nr_groups);
383 * pcpu_should_reclaim_chunk - determine if a chunk should go into reclaim
403 * there is no system-wide shortage of empty pages aside from this
406 return ((chunk->isolated && chunk->nr_empty_pop_pages) ||
408 (PCPU_EMPTY_POP_PAGES_HIGH + chunk->nr_empty_pop_pages) &&
409 chunk->nr_empty_pop_pages >= chunk->nr_pages / 4));