Lines Matching defs:chunk
2 * mm/percpu-km.c - kernel memory based chunk allocation
20 * - NUMA is not supported. When setting up the first chunk,
24 * - It's best if the chunk size is power of two multiple of
25 * PAGE_SIZE. Because each chunk is allocated as a contiguous
27 * chunk size is not aligned. percpu-km code will whine about it.
31 #error "contiguous percpu allocation is incompatible with paged first chunk"
36 static int pcpu_populate_chunk(struct pcpu_chunk *chunk, int off, int size)
42 static void pcpu_depopulate_chunk(struct pcpu_chunk *chunk, int off, int size)
50 struct pcpu_chunk *chunk;
54 chunk = pcpu_alloc_chunk();
55 if (!chunk)
60 pcpu_free_chunk(chunk);
65 pcpu_set_page_chunk(nth_page(pages, i), chunk);
67 chunk->data = pages;
68 chunk->base_addr = page_address(pages) - pcpu_group_offsets[0];
69 return chunk;
72 static void pcpu_destroy_chunk(struct pcpu_chunk *chunk)
76 if (chunk && chunk->data)
77 __free_pages(chunk->data, order_base_2(nr_pages));
78 pcpu_free_chunk(chunk);
100 printk(KERN_WARNING "percpu: wasting %zu pages per chunk\n",