Lines Matching refs:chunk
3 * mm/percpu-km.c - kernel memory based chunk allocation
19 * - NUMA is not supported. When setting up the first chunk,
23 * - It's best if the chunk size is power of two multiple of
24 * PAGE_SIZE. Because each chunk is allocated as a contiguous
26 * chunk size is not aligned. percpu-km code will whine about it.
30 #error "contiguous percpu allocation is incompatible with paged first chunk"
35 static int pcpu_populate_chunk(struct pcpu_chunk *chunk,
41 static void pcpu_depopulate_chunk(struct pcpu_chunk *chunk,
51 struct pcpu_chunk *chunk;
56 chunk = pcpu_alloc_chunk(type, gfp);
57 if (!chunk)
62 pcpu_free_chunk(chunk);
67 pcpu_set_page_chunk(nth_page(pages, i), chunk);
69 chunk->data = pages;
70 chunk->base_addr = page_address(pages);
73 pcpu_chunk_populated(chunk, 0, nr_pages);
77 trace_percpu_create_chunk(chunk->base_addr);
79 return chunk;
82 static void pcpu_destroy_chunk(struct pcpu_chunk *chunk)
86 if (!chunk)
90 trace_percpu_destroy_chunk(chunk->base_addr);
92 if (chunk->data)
93 __free_pages(chunk->data, order_base_2(nr_pages));
94 pcpu_free_chunk(chunk);
116 pr_warn("wasting %zu pages per chunk\n",