Commit e47c897
committed
slab: add sheaves to most caches
In the first step to replace cpu (partial) slabs with sheaves, enable
sheaves for almost all caches. Treat args->sheaf_capacity as a minimum,
and calculate sheaf capacity with a formula that roughly follows the
formula for number of objects in cpu partial slabs in set_cpu_partial().
This should achieve roughly similar contention on the barn spin lock as
there's currently for node list_lock without sheaves, to make
benchmarking results comparable. It can be further tuned later.
Don't enable sheaves for bootstrap caches as that wouldn't work. In
order to recognize them by SLAB_NO_OBJ_EXT, make sure the flag exists
even for !CONFIG_SLAB_OBJ_EXT.
This limitation will be lifted for kmalloc caches after the necessary
bootstrapping changes.
Also do not enable sheaves for SLAB_NOLEAKTRACE caches to avoid
recursion with kmemleak tracking (thanks to Breno Leitao).
Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Reviewed-by: Harry Yoo <harry.yoo@oracle.com>
Reviewed-by: Hao Li <hao.li@linux.dev>
Tested-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Tested-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>1 parent 4b038a9 commit e47c897
2 files changed
Lines changed: 52 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | 60 | | |
62 | | - | |
63 | 61 | | |
64 | 62 | | |
65 | 63 | | |
| |||
238 | 236 | | |
239 | 237 | | |
240 | 238 | | |
241 | | - | |
242 | 239 | | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | 240 | | |
247 | 241 | | |
248 | 242 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7893 | 7893 | | |
7894 | 7894 | | |
7895 | 7895 | | |
| 7896 | + | |
| 7897 | + | |
| 7898 | + | |
| 7899 | + | |
| 7900 | + | |
| 7901 | + | |
| 7902 | + | |
| 7903 | + | |
| 7904 | + | |
| 7905 | + | |
| 7906 | + | |
| 7907 | + | |
| 7908 | + | |
| 7909 | + | |
| 7910 | + | |
| 7911 | + | |
| 7912 | + | |
| 7913 | + | |
| 7914 | + | |
| 7915 | + | |
| 7916 | + | |
| 7917 | + | |
| 7918 | + | |
| 7919 | + | |
| 7920 | + | |
| 7921 | + | |
| 7922 | + | |
| 7923 | + | |
| 7924 | + | |
| 7925 | + | |
| 7926 | + | |
| 7927 | + | |
| 7928 | + | |
| 7929 | + | |
| 7930 | + | |
| 7931 | + | |
| 7932 | + | |
| 7933 | + | |
| 7934 | + | |
| 7935 | + | |
| 7936 | + | |
| 7937 | + | |
| 7938 | + | |
| 7939 | + | |
| 7940 | + | |
| 7941 | + | |
| 7942 | + | |
7896 | 7943 | | |
7897 | 7944 | | |
7898 | 7945 | | |
| |||
8027 | 8074 | | |
8028 | 8075 | | |
8029 | 8076 | | |
| 8077 | + | |
| 8078 | + | |
| 8079 | + | |
| 8080 | + | |
8030 | 8081 | | |
8031 | 8082 | | |
8032 | 8083 | | |
| |||
8631 | 8682 | | |
8632 | 8683 | | |
8633 | 8684 | | |
8634 | | - | |
8635 | | - | |
| 8685 | + | |
8636 | 8686 | | |
8637 | 8687 | | |
8638 | 8688 | | |
8639 | 8689 | | |
8640 | 8690 | | |
8641 | | - | |
8642 | | - | |
8643 | 8691 | | |
8644 | 8692 | | |
8645 | 8693 | | |
| |||
0 commit comments