Lines Matching full: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 void pcpu_post_unmap_tlb_flush(struct pcpu_chunk *chunk, in pcpu_post_unmap_tlb_flush() argument
41 static int pcpu_populate_chunk(struct pcpu_chunk *chunk, in pcpu_populate_chunk() argument
47 static void pcpu_depopulate_chunk(struct pcpu_chunk *chunk, in pcpu_depopulate_chunk() argument
56 struct pcpu_chunk *chunk; in pcpu_create_chunk() local
61 chunk = pcpu_alloc_chunk(gfp); in pcpu_create_chunk()
62 if (!chunk) in pcpu_create_chunk()
67 pcpu_free_chunk(chunk); in pcpu_create_chunk()
72 pcpu_set_page_chunk(nth_page(pages, i), chunk); in pcpu_create_chunk()
74 chunk->data = pages; in pcpu_create_chunk()
75 chunk->base_addr = page_address(pages); in pcpu_create_chunk()
78 pcpu_chunk_populated(chunk, 0, nr_pages); in pcpu_create_chunk()
82 trace_percpu_create_chunk(chunk->base_addr); in pcpu_create_chunk()
84 return chunk; in pcpu_create_chunk()
87 static void pcpu_destroy_chunk(struct pcpu_chunk *chunk) in pcpu_destroy_chunk() argument
91 if (!chunk) in pcpu_destroy_chunk()
95 trace_percpu_destroy_chunk(chunk->base_addr); in pcpu_destroy_chunk()
97 if (chunk->data) in pcpu_destroy_chunk()
98 __free_pages(chunk->data, order_base_2(nr_pages)); in pcpu_destroy_chunk()
99 pcpu_free_chunk(chunk); in pcpu_destroy_chunk()
121 pr_warn("wasting %zu pages per chunk\n", in pcpu_verify_alloc_info()
127 static bool pcpu_should_reclaim_chunk(struct pcpu_chunk *chunk) in pcpu_should_reclaim_chunk() argument