hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
kernel/include/linux/percpu.h
....@@ -26,16 +26,10 @@
2626 #define PCPU_MIN_ALLOC_SHIFT 2
2727 #define PCPU_MIN_ALLOC_SIZE (1 << PCPU_MIN_ALLOC_SHIFT)
2828
29
-/* number of bits per page, used to trigger a scan if blocks are > PAGE_SIZE */
30
-#define PCPU_BITS_PER_PAGE (PAGE_SIZE >> PCPU_MIN_ALLOC_SHIFT)
31
-
3229 /*
33
- * This determines the size of each metadata block. There are several subtle
34
- * constraints around this constant. The reserved region must be a multiple of
35
- * PCPU_BITMAP_BLOCK_SIZE. Additionally, PCPU_BITMAP_BLOCK_SIZE must be a
36
- * multiple of PAGE_SIZE or PAGE_SIZE must be a multiple of
37
- * PCPU_BITMAP_BLOCK_SIZE to align with the populated page map. The unit_size
38
- * also has to be a multiple of PCPU_BITMAP_BLOCK_SIZE to ensure full blocks.
30
+ * The PCPU_BITMAP_BLOCK_SIZE must be the same size as PAGE_SIZE as the
31
+ * updating of hints is used to manage the nr_empty_pop_pages in both
32
+ * the chunk and globally.
3933 */
4034 #define PCPU_BITMAP_BLOCK_SIZE PAGE_SIZE
4135 #define PCPU_BITMAP_BLOCK_BITS (PCPU_BITMAP_BLOCK_SIZE >> \
....@@ -111,7 +105,7 @@
111105 int nr_units);
112106 extern void __init pcpu_free_alloc_info(struct pcpu_alloc_info *ai);
113107
114
-extern int __init pcpu_setup_first_chunk(const struct pcpu_alloc_info *ai,
108
+extern void __init pcpu_setup_first_chunk(const struct pcpu_alloc_info *ai,
115109 void *base_addr);
116110
117111 #ifdef CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK