Commit 913ffd3
committed
slab: handle kmalloc sheaves bootstrap
Enable sheaves for kmalloc caches. For other types than KMALLOC_NORMAL,
we can simply allow them in calculate_sizes() as they are created later
than KMALLOC_NORMAL caches and can allocate sheaves and barns from
those.
For KMALLOC_NORMAL caches we perform additional step after first
creating them without sheaves. Then bootstrap_cache_sheaves() simply
allocates and initializes barns and sheaves and finally sets
s->sheaf_capacity to make them actually used.
Afterwards the only caches left without sheaves (unless SLUB_TINY or
debugging is enabled) are kmem_cache and kmem_cache_node. These are only
used when creating or destroying other kmem_caches. Thus they are not
performance critical and we can simply leave it that way.
Reviewed-by: Harry Yoo <harry.yoo@oracle.com>
Reviewed-by: Hao Li <hao.li@linux.dev>
Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>1 parent f1427a1 commit 913ffd3
1 file changed
Lines changed: 84 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2593 | 2593 | | |
2594 | 2594 | | |
2595 | 2595 | | |
2596 | | - | |
| 2596 | + | |
| 2597 | + | |
2597 | 2598 | | |
2598 | 2599 | | |
2599 | 2600 | | |
| |||
2611 | 2612 | | |
2612 | 2613 | | |
2613 | 2614 | | |
2614 | | - | |
| 2615 | + | |
2615 | 2616 | | |
2616 | 2617 | | |
2617 | 2618 | | |
| |||
2624 | 2625 | | |
2625 | 2626 | | |
2626 | 2627 | | |
| 2628 | + | |
| 2629 | + | |
| 2630 | + | |
| 2631 | + | |
| 2632 | + | |
| 2633 | + | |
2627 | 2634 | | |
2628 | 2635 | | |
2629 | 2636 | | |
| |||
8157 | 8164 | | |
8158 | 8165 | | |
8159 | 8166 | | |
8160 | | - | |
8161 | | - | |
| 8167 | + | |
| 8168 | + | |
| 8169 | + | |
| 8170 | + | |
| 8171 | + | |
8162 | 8172 | | |
8163 | 8173 | | |
8164 | 8174 | | |
| |||
8653 | 8663 | | |
8654 | 8664 | | |
8655 | 8665 | | |
| 8666 | + | |
| 8667 | + | |
| 8668 | + | |
| 8669 | + | |
| 8670 | + | |
| 8671 | + | |
| 8672 | + | |
| 8673 | + | |
| 8674 | + | |
| 8675 | + | |
| 8676 | + | |
| 8677 | + | |
| 8678 | + | |
| 8679 | + | |
| 8680 | + | |
| 8681 | + | |
| 8682 | + | |
| 8683 | + | |
| 8684 | + | |
| 8685 | + | |
| 8686 | + | |
| 8687 | + | |
| 8688 | + | |
| 8689 | + | |
| 8690 | + | |
| 8691 | + | |
| 8692 | + | |
| 8693 | + | |
| 8694 | + | |
| 8695 | + | |
| 8696 | + | |
| 8697 | + | |
| 8698 | + | |
| 8699 | + | |
| 8700 | + | |
| 8701 | + | |
| 8702 | + | |
| 8703 | + | |
| 8704 | + | |
| 8705 | + | |
| 8706 | + | |
| 8707 | + | |
| 8708 | + | |
| 8709 | + | |
| 8710 | + | |
| 8711 | + | |
| 8712 | + | |
| 8713 | + | |
| 8714 | + | |
| 8715 | + | |
| 8716 | + | |
| 8717 | + | |
| 8718 | + | |
| 8719 | + | |
| 8720 | + | |
| 8721 | + | |
| 8722 | + | |
| 8723 | + | |
| 8724 | + | |
| 8725 | + | |
| 8726 | + | |
| 8727 | + | |
| 8728 | + | |
| 8729 | + | |
| 8730 | + | |
| 8731 | + | |
| 8732 | + | |
| 8733 | + | |
8656 | 8734 | | |
8657 | 8735 | | |
8658 | 8736 | | |
| |||
8696 | 8774 | | |
8697 | 8775 | | |
8698 | 8776 | | |
| 8777 | + | |
| 8778 | + | |
8699 | 8779 | | |
8700 | 8780 | | |
8701 | 8781 | | |
| |||
0 commit comments