1 // SPDX-License-Identifier: MIT
2 // SPDX-FileCopyrightText: 2024 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 #include <rseq/mempool.h>
11 #include <rseq/compiler.h>
22 #include "rseq-utils.h"
26 * rseq-mempool.c: rseq CPU-Local Storage (CLS) memory allocator.
28 * The rseq per-CPU memory allocator allows the application the request
29 * memory pools of CPU-Local memory each of containing objects of a
30 * given size (rounded to next power of 2), reserving a given virtual
31 * address size per CPU, for a given maximum number of CPUs.
33 * The per-CPU memory allocator is analogous to TLS (Thread-Local
34 * Storage) memory: TLS is Thread-Local Storage, whereas the per-CPU
35 * memory allocator provides CPU-Local Storage.
38 #define POOL_SET_NR_ENTRIES RSEQ_BITS_PER_LONG
41 * Smallest allocation should hold enough space for a free list pointer.
43 #if RSEQ_BITS_PER_LONG == 64
44 # define POOL_SET_MIN_ENTRY 3 /* Smallest item_len=8 */
46 # define POOL_SET_MIN_ENTRY 2 /* Smallest item_len=4 */
50 * Skip pool index 0 to ensure allocated entries at index 0 do not match
55 #define BIT_PER_ULONG (8 * sizeof(unsigned long))
57 #define MOVE_PAGES_BATCH_SIZE 4096
59 #define RANGE_HEADER_OFFSET sizeof(struct rseq_mempool_range)
61 struct free_list_node
;
63 struct free_list_node
{
64 struct free_list_node
*next
;
68 MEMPOOL_TYPE_GLOBAL
= 0, /* Default */
69 MEMPOOL_TYPE_PERCPU
= 1,
72 struct rseq_mempool_attr
{
74 void *(*mmap_func
)(void *priv
, size_t len
);
75 int (*munmap_func
)(void *priv
, void *ptr
, size_t len
);
79 void (*init_func
)(void *priv
, void *addr
, size_t len
, int cpu
);
84 enum mempool_type type
;
89 struct rseq_mempool_range
;
91 struct rseq_mempool_range
{
92 struct rseq_mempool_range
*next
;
93 struct rseq_mempool
*pool
; /* Backward ref. to container pool. */
97 /* Track alloc/free. */
98 unsigned long *alloc_bitmap
;
101 struct rseq_mempool
{
102 /* Linked-list of ranges. */
103 struct rseq_mempool_range
*ranges
;
109 * The free list chains freed items on the CPU 0 address range.
110 * We should rethink this decision if false sharing between
111 * malloc/free from other CPUs and data accesses from CPU 0
112 * becomes an issue. This is a NULL-terminated singly-linked
115 struct free_list_node
*free_list_head
;
117 /* This lock protects allocation/free within the pool. */
118 pthread_mutex_t lock
;
120 struct rseq_mempool_attr attr
;
125 * Pool set entries are indexed by item_len rounded to the next power of
126 * 2. A pool set can contain NULL pool entries, in which case the next
127 * large enough entry will be used for allocation.
129 struct rseq_mempool_set
{
130 /* This lock protects add vs malloc/zmalloc within the pool set. */
131 pthread_mutex_t lock
;
132 struct rseq_mempool
*entries
[POOL_SET_NR_ENTRIES
];
136 void *__rseq_pool_range_percpu_ptr(struct rseq_mempool_range
*range
, int cpu
,
137 uintptr_t item_offset
, size_t stride
)
139 return range
->base
+ (stride
* cpu
) + item_offset
;
143 void rseq_percpu_zero_item(struct rseq_mempool
*pool
,
144 struct rseq_mempool_range
*range
, uintptr_t item_offset
)
148 for (i
= 0; i
< pool
->attr
.max_nr_cpus
; i
++) {
149 char *p
= __rseq_pool_range_percpu_ptr(range
, i
,
150 item_offset
, pool
->attr
.stride
);
151 memset(p
, 0, pool
->item_len
);
156 int rseq_mempool_range_init_numa(void *addr
, size_t len
, int cpu
, int numa_flags
)
158 unsigned long nr_pages
, page_len
;
159 int status
[MOVE_PAGES_BATCH_SIZE
];
160 int nodes
[MOVE_PAGES_BATCH_SIZE
];
161 void *pages
[MOVE_PAGES_BATCH_SIZE
];
168 page_len
= rseq_get_page_len();
169 nr_pages
= len
>> rseq_get_count_order_ulong(page_len
);
171 nodes
[0] = numa_node_of_cpu(cpu
);
175 for (size_t k
= 1; k
< RSEQ_ARRAY_SIZE(nodes
); ++k
) {
179 for (unsigned long page
= 0; page
< nr_pages
;) {
181 size_t max_k
= RSEQ_ARRAY_SIZE(pages
);
182 size_t left
= nr_pages
- page
;
188 for (size_t k
= 0; k
< max_k
; ++k
, ++page
) {
189 pages
[k
] = addr
+ (page
* page_len
);
193 ret
= move_pages(0, max_k
, pages
, nodes
, status
, numa_flags
);
199 fprintf(stderr
, "%lu pages were not migrated\n", ret
);
200 for (size_t k
= 0; k
< max_k
; ++k
) {
203 "Error while moving page %p to numa node %d: %u\n",
204 pages
[k
], nodes
[k
], -status
[k
]);
211 int rseq_mempool_range_init_numa(void *addr
__attribute__((unused
)),
212 size_t len
__attribute__((unused
)),
213 int cpu
__attribute__((unused
)),
214 int numa_flags
__attribute__((unused
)))
222 void *default_mmap_func(void *priv
__attribute__((unused
)), size_t len
)
226 base
= mmap(NULL
, len
, PROT_READ
| PROT_WRITE
,
227 MAP_ANONYMOUS
| MAP_PRIVATE
, -1, 0);
228 if (base
== MAP_FAILED
)
234 int default_munmap_func(void *priv
__attribute__((unused
)), void *ptr
, size_t len
)
236 return munmap(ptr
, len
);
240 int create_alloc_bitmap(struct rseq_mempool
*pool
, struct rseq_mempool_range
*range
)
244 count
= ((pool
->attr
.stride
>> pool
->item_order
) + BIT_PER_ULONG
- 1) / BIT_PER_ULONG
;
247 * Not being able to create the validation bitmap is an error
248 * that needs to be reported.
250 range
->alloc_bitmap
= calloc(count
, sizeof(unsigned long));
251 if (!range
->alloc_bitmap
)
257 const char *get_pool_name(const struct rseq_mempool
*pool
)
259 return pool
->name
? : "<anonymous>";
263 bool addr_in_pool(const struct rseq_mempool
*pool
, void *addr
)
265 struct rseq_mempool_range
*range
;
267 for (range
= pool
->ranges
; range
; range
= range
->next
) {
268 if (addr
>= range
->base
&& addr
< range
->base
+ range
->next_unused
)
274 /* Always inline for __builtin_return_address(0). */
275 static inline __attribute__((always_inline
))
276 void check_free_list(const struct rseq_mempool
*pool
)
278 size_t total_item
= 0, total_never_allocated
= 0, total_freed
= 0,
279 max_list_traversal
= 0, traversal_iteration
= 0;
280 struct rseq_mempool_range
*range
;
282 if (!pool
->attr
.robust_set
)
285 for (range
= pool
->ranges
; range
; range
= range
->next
) {
286 total_item
+= pool
->attr
.stride
>> pool
->item_order
;
287 total_never_allocated
+= (pool
->attr
.stride
- range
->next_unused
) >> pool
->item_order
;
289 max_list_traversal
= total_item
- total_never_allocated
;
291 for (struct free_list_node
*node
= pool
->free_list_head
, *prev
= NULL
;
296 void *node_addr
= node
;
298 if (traversal_iteration
>= max_list_traversal
) {
299 fprintf(stderr
, "%s: Corrupted free-list; Possibly infinite loop in pool \"%s\" (%p), caller %p.\n",
300 __func__
, get_pool_name(pool
), pool
, __builtin_return_address(0));
304 /* Node is out of range. */
305 if (!addr_in_pool(pool
, node_addr
)) {
307 fprintf(stderr
, "%s: Corrupted free-list node %p -> [out-of-range %p] in pool \"%s\" (%p), caller %p.\n",
308 __func__
, prev
, node
, get_pool_name(pool
), pool
, __builtin_return_address(0));
310 fprintf(stderr
, "%s: Corrupted free-list node [out-of-range %p] in pool \"%s\" (%p), caller %p.\n",
311 __func__
, node
, get_pool_name(pool
), pool
, __builtin_return_address(0));
315 traversal_iteration
++;
319 if (total_never_allocated
+ total_freed
!= total_item
) {
320 fprintf(stderr
, "%s: Corrupted free-list in pool \"%s\" (%p); total-item: %zu total-never-used: %zu total-freed: %zu, caller %p.\n",
321 __func__
, get_pool_name(pool
), pool
, total_item
, total_never_allocated
, total_freed
, __builtin_return_address(0));
326 /* Always inline for __builtin_return_address(0). */
327 static inline __attribute__((always_inline
))
328 void destroy_alloc_bitmap(struct rseq_mempool
*pool
, struct rseq_mempool_range
*range
)
330 unsigned long *bitmap
= range
->alloc_bitmap
;
331 size_t count
, total_leaks
= 0;
336 count
= ((pool
->attr
.stride
>> pool
->item_order
) + BIT_PER_ULONG
- 1) / BIT_PER_ULONG
;
338 /* Assert that all items in the pool were freed. */
339 for (size_t k
= 0; k
< count
; ++k
)
340 total_leaks
+= rseq_hweight_ulong(bitmap
[k
]);
342 fprintf(stderr
, "%s: Pool \"%s\" (%p) has %zu leaked items on destroy, caller: %p.\n",
343 __func__
, get_pool_name(pool
), pool
, total_leaks
, (void *) __builtin_return_address(0));
350 /* Always inline for __builtin_return_address(0). */
351 static inline __attribute__((always_inline
))
352 int rseq_mempool_range_destroy(struct rseq_mempool
*pool
,
353 struct rseq_mempool_range
*range
)
355 destroy_alloc_bitmap(pool
, range
);
356 /* range is a header located one page before the aligned mapping. */
357 return pool
->attr
.munmap_func(pool
->attr
.mmap_priv
, range
->header
,
358 (pool
->attr
.stride
* pool
->attr
.max_nr_cpus
) + rseq_get_page_len());
362 * Allocate a memory mapping aligned on @alignment, with an optional
363 * @pre_header before the mapping.
366 void *aligned_mmap_anonymous(struct rseq_mempool
*pool
,
367 size_t page_size
, size_t len
, size_t alignment
,
368 void **pre_header
, size_t pre_header_len
)
370 size_t minimum_page_count
, page_count
, extra
, total_allocate
= 0;
374 if (len
< page_size
|| alignment
< page_size
||
375 !is_pow2(len
) || !is_pow2(alignment
)) {
379 page_order
= rseq_get_count_order_ulong(page_size
);
380 if (page_order
< 0) {
384 if (pre_header_len
&& (pre_header_len
& (page_size
- 1))) {
389 minimum_page_count
= (pre_header_len
+ len
) >> page_order
;
390 page_count
= (pre_header_len
+ len
+ alignment
- page_size
) >> page_order
;
392 assert(page_count
>= minimum_page_count
);
394 ptr
= pool
->attr
.mmap_func(pool
->attr
.mmap_priv
, page_count
<< page_order
);
398 total_allocate
= page_count
<< page_order
;
400 if (!(((uintptr_t) ptr
+ pre_header_len
) & (alignment
- 1))) {
401 /* Pointer is already aligned. ptr points to pre_header. */
405 /* Unmap extra before. */
406 extra
= offset_align((uintptr_t) ptr
+ pre_header_len
, alignment
);
407 assert(!(extra
& (page_size
- 1)));
408 if (pool
->attr
.munmap_func(pool
->attr
.mmap_priv
, ptr
, extra
)) {
412 total_allocate
-= extra
;
413 ptr
+= extra
; /* ptr points to pre_header */
414 page_count
-= extra
>> page_order
;
416 assert(page_count
>= minimum_page_count
);
418 if (page_count
> minimum_page_count
) {
421 /* Unmap extra after. */
422 extra_ptr
= ptr
+ (minimum_page_count
<< page_order
);
423 extra
= (page_count
- minimum_page_count
) << page_order
;
424 if (pool
->attr
.munmap_func(pool
->attr
.mmap_priv
, extra_ptr
, extra
)) {
428 total_allocate
-= extra
;
431 assert(!(((uintptr_t)ptr
+ pre_header_len
) & (alignment
- 1)));
432 assert(total_allocate
== len
+ pre_header_len
);
438 ptr
+= pre_header_len
;
444 struct rseq_mempool_range
*rseq_mempool_range_create(struct rseq_mempool
*pool
)
446 struct rseq_mempool_range
*range
;
447 unsigned long page_size
;
451 page_size
= rseq_get_page_len();
453 base
= aligned_mmap_anonymous(pool
, page_size
,
454 pool
->attr
.stride
* pool
->attr
.max_nr_cpus
,
459 range
= (struct rseq_mempool_range
*) (base
- RANGE_HEADER_OFFSET
);
462 range
->header
= header
;
463 if (pool
->attr
.robust_set
) {
464 if (create_alloc_bitmap(pool
, range
))
467 if (pool
->attr
.init_set
) {
470 for (cpu
= 0; cpu
< pool
->attr
.max_nr_cpus
; cpu
++) {
471 pool
->attr
.init_func(pool
->attr
.init_priv
,
472 base
+ (pool
->attr
.stride
* cpu
),
473 pool
->attr
.stride
, cpu
);
479 (void) rseq_mempool_range_destroy(pool
, range
);
483 int rseq_mempool_destroy(struct rseq_mempool
*pool
)
485 struct rseq_mempool_range
*range
, *next_range
;
490 check_free_list(pool
);
491 /* Iteration safe against removal. */
492 for (range
= pool
->ranges
; range
&& (next_range
= range
->next
, 1); range
= next_range
) {
493 if (rseq_mempool_range_destroy(pool
, range
))
495 /* Update list head to keep list coherent in case of partial failure. */
496 pool
->ranges
= next_range
;
498 pthread_mutex_destroy(&pool
->lock
);
500 memset(pool
, 0, sizeof(*pool
));
505 struct rseq_mempool
*rseq_mempool_create(const char *pool_name
,
506 size_t item_len
, const struct rseq_mempool_attr
*_attr
)
508 struct rseq_mempool
*pool
;
509 struct rseq_mempool_attr attr
= {};
512 /* Make sure each item is large enough to contain free list pointers. */
513 if (item_len
< sizeof(void *))
514 item_len
= sizeof(void *);
516 /* Align item_len on next power of two. */
517 order
= rseq_get_count_order_ulong(item_len
);
522 item_len
= 1UL << order
;
525 memcpy(&attr
, _attr
, sizeof(attr
));
526 if (!attr
.mmap_set
) {
527 attr
.mmap_func
= default_mmap_func
;
528 attr
.munmap_func
= default_munmap_func
;
529 attr
.mmap_priv
= NULL
;
533 case MEMPOOL_TYPE_PERCPU
:
534 if (attr
.max_nr_cpus
< 0) {
538 if (attr
.max_nr_cpus
== 0) {
540 attr
.max_nr_cpus
= get_possible_cpus_array_len();
541 if (attr
.max_nr_cpus
== 0) {
547 case MEMPOOL_TYPE_GLOBAL
:
548 /* Use a 1-cpu pool for global mempool type. */
549 attr
.max_nr_cpus
= 1;
553 attr
.stride
= RSEQ_MEMPOOL_STRIDE
; /* Use default */
554 if (item_len
> attr
.stride
|| attr
.stride
< (size_t) rseq_get_page_len() ||
555 !is_pow2(attr
.stride
)) {
560 pool
= calloc(1, sizeof(struct rseq_mempool
));
564 memcpy(&pool
->attr
, &attr
, sizeof(attr
));
565 pthread_mutex_init(&pool
->lock
, NULL
);
566 pool
->item_len
= item_len
;
567 pool
->item_order
= order
;
569 //TODO: implement multi-range support.
570 pool
->ranges
= rseq_mempool_range_create(pool
);
575 pool
->name
= strdup(pool_name
);
582 rseq_mempool_destroy(pool
);
587 /* Always inline for __builtin_return_address(0). */
588 static inline __attribute__((always_inline
))
589 void set_alloc_slot(struct rseq_mempool
*pool
, size_t item_offset
)
591 unsigned long *bitmap
= pool
->ranges
->alloc_bitmap
;
592 size_t item_index
= item_offset
>> pool
->item_order
;
599 k
= item_index
/ BIT_PER_ULONG
;
600 mask
= 1ULL << (item_index
% BIT_PER_ULONG
);
602 /* Print error if bit is already set. */
603 if (bitmap
[k
] & mask
) {
604 fprintf(stderr
, "%s: Allocator corruption detected for pool: \"%s\" (%p), item offset: %zu, caller: %p.\n",
605 __func__
, get_pool_name(pool
), pool
, item_offset
, (void *) __builtin_return_address(0));
612 void __rseq_percpu
*__rseq_percpu_malloc(struct rseq_mempool
*pool
, bool zeroed
)
614 struct free_list_node
*node
;
615 uintptr_t item_offset
;
616 void __rseq_percpu
*addr
;
618 pthread_mutex_lock(&pool
->lock
);
619 /* Get first entry from free list. */
620 node
= pool
->free_list_head
;
622 /* Remove node from free list (update head). */
623 pool
->free_list_head
= node
->next
;
624 item_offset
= (uintptr_t) ((void *) node
- pool
->ranges
->base
);
625 addr
= (void __rseq_percpu
*) (pool
->ranges
->base
+ item_offset
);
628 if (pool
->ranges
->next_unused
+ pool
->item_len
> pool
->attr
.stride
) {
633 item_offset
= pool
->ranges
->next_unused
;
634 addr
= (void __rseq_percpu
*) (pool
->ranges
->base
+ item_offset
);
635 pool
->ranges
->next_unused
+= pool
->item_len
;
638 set_alloc_slot(pool
, item_offset
);
639 pthread_mutex_unlock(&pool
->lock
);
641 rseq_percpu_zero_item(pool
, pool
->ranges
, item_offset
);
645 void __rseq_percpu
*rseq_mempool_percpu_malloc(struct rseq_mempool
*pool
)
647 return __rseq_percpu_malloc(pool
, false);
650 void __rseq_percpu
*rseq_mempool_percpu_zmalloc(struct rseq_mempool
*pool
)
652 return __rseq_percpu_malloc(pool
, true);
655 /* Always inline for __builtin_return_address(0). */
656 static inline __attribute__((always_inline
))
657 void clear_alloc_slot(struct rseq_mempool
*pool
, size_t item_offset
)
659 unsigned long *bitmap
= pool
->ranges
->alloc_bitmap
;
660 size_t item_index
= item_offset
>> pool
->item_order
;
667 k
= item_index
/ BIT_PER_ULONG
;
668 mask
= 1ULL << (item_index
% BIT_PER_ULONG
);
670 /* Print error if bit is not set. */
671 if (!(bitmap
[k
] & mask
)) {
672 fprintf(stderr
, "%s: Double-free detected for pool: \"%s\" (%p), item offset: %zu, caller: %p.\n",
673 __func__
, get_pool_name(pool
), pool
, item_offset
,
674 (void *) __builtin_return_address(0));
680 void librseq_mempool_percpu_free(void __rseq_percpu
*_ptr
, size_t stride
)
682 uintptr_t ptr
= (uintptr_t) _ptr
;
683 void *range_base
= (void *) (ptr
& (~(stride
- 1)));
684 struct rseq_mempool_range
*range
= (struct rseq_mempool_range
*) (range_base
- RANGE_HEADER_OFFSET
);
685 struct rseq_mempool
*pool
= range
->pool
;
686 uintptr_t item_offset
= ptr
& (stride
- 1);
687 struct free_list_node
*head
, *item
;
689 pthread_mutex_lock(&pool
->lock
);
690 clear_alloc_slot(pool
, item_offset
);
691 /* Add ptr to head of free list */
692 head
= pool
->free_list_head
;
693 /* Free-list is in CPU 0 range. */
694 item
= (struct free_list_node
*) ptr
;
696 pool
->free_list_head
= item
;
697 pthread_mutex_unlock(&pool
->lock
);
700 struct rseq_mempool_set
*rseq_mempool_set_create(void)
702 struct rseq_mempool_set
*pool_set
;
704 pool_set
= calloc(1, sizeof(struct rseq_mempool_set
));
707 pthread_mutex_init(&pool_set
->lock
, NULL
);
711 int rseq_mempool_set_destroy(struct rseq_mempool_set
*pool_set
)
715 for (order
= POOL_SET_MIN_ENTRY
; order
< POOL_SET_NR_ENTRIES
; order
++) {
716 struct rseq_mempool
*pool
= pool_set
->entries
[order
];
720 ret
= rseq_mempool_destroy(pool
);
723 pool_set
->entries
[order
] = NULL
;
725 pthread_mutex_destroy(&pool_set
->lock
);
730 /* Ownership of pool is handed over to pool set on success. */
731 int rseq_mempool_set_add_pool(struct rseq_mempool_set
*pool_set
, struct rseq_mempool
*pool
)
733 size_t item_order
= pool
->item_order
;
736 pthread_mutex_lock(&pool_set
->lock
);
737 if (pool_set
->entries
[item_order
]) {
742 pool_set
->entries
[pool
->item_order
] = pool
;
744 pthread_mutex_unlock(&pool_set
->lock
);
749 void __rseq_percpu
*__rseq_mempool_set_malloc(struct rseq_mempool_set
*pool_set
, size_t len
, bool zeroed
)
751 int order
, min_order
= POOL_SET_MIN_ENTRY
;
752 struct rseq_mempool
*pool
;
753 void __rseq_percpu
*addr
;
755 order
= rseq_get_count_order_ulong(len
);
756 if (order
> POOL_SET_MIN_ENTRY
)
759 pthread_mutex_lock(&pool_set
->lock
);
760 /* First smallest present pool where @len fits. */
761 for (order
= min_order
; order
< POOL_SET_NR_ENTRIES
; order
++) {
762 pool
= pool_set
->entries
[order
];
766 if (pool
->item_len
>= len
)
771 pthread_mutex_unlock(&pool_set
->lock
);
773 addr
= __rseq_percpu_malloc(pool
, zeroed
);
774 if (addr
== NULL
&& errno
== ENOMEM
) {
776 * If the allocation failed, try again with a
779 min_order
= order
+ 1;
790 void __rseq_percpu
*rseq_mempool_set_percpu_malloc(struct rseq_mempool_set
*pool_set
, size_t len
)
792 return __rseq_mempool_set_malloc(pool_set
, len
, false);
795 void __rseq_percpu
*rseq_mempool_set_percpu_zmalloc(struct rseq_mempool_set
*pool_set
, size_t len
)
797 return __rseq_mempool_set_malloc(pool_set
, len
, true);
800 struct rseq_mempool_attr
*rseq_mempool_attr_create(void)
802 return calloc(1, sizeof(struct rseq_mempool_attr
));
805 void rseq_mempool_attr_destroy(struct rseq_mempool_attr
*attr
)
810 int rseq_mempool_attr_set_mmap(struct rseq_mempool_attr
*attr
,
811 void *(*mmap_func
)(void *priv
, size_t len
),
812 int (*munmap_func
)(void *priv
, void *ptr
, size_t len
),
819 attr
->mmap_set
= true;
820 attr
->mmap_func
= mmap_func
;
821 attr
->munmap_func
= munmap_func
;
822 attr
->mmap_priv
= mmap_priv
;
826 int rseq_mempool_attr_set_init(struct rseq_mempool_attr
*attr
,
827 void (*init_func
)(void *priv
, void *addr
, size_t len
, int cpu
),
834 attr
->init_set
= true;
835 attr
->init_func
= init_func
;
836 attr
->init_priv
= init_priv
;
840 int rseq_mempool_attr_set_robust(struct rseq_mempool_attr
*attr
)
846 attr
->robust_set
= true;
850 int rseq_mempool_attr_set_percpu(struct rseq_mempool_attr
*attr
,
851 size_t stride
, int max_nr_cpus
)
857 attr
->type
= MEMPOOL_TYPE_PERCPU
;
858 attr
->stride
= stride
;
859 attr
->max_nr_cpus
= max_nr_cpus
;
863 int rseq_mempool_attr_set_global(struct rseq_mempool_attr
*attr
,
870 attr
->type
= MEMPOOL_TYPE_GLOBAL
;
871 attr
->stride
= stride
;
872 attr
->max_nr_cpus
= 0;
876 int rseq_mempool_get_max_nr_cpus(struct rseq_mempool
*mempool
)
878 if (!mempool
|| mempool
->attr
.type
!= MEMPOOL_TYPE_PERCPU
) {
882 return mempool
->attr
.max_nr_cpus
;
This page took 0.050358 seconds and 4 git commands to generate.