Skip to content

Commit 61d7e36

Browse files
committed
Merge branch 'slab/for-6.8/slub-hook-cleanups' into slab/for-next
Merge the SLAB allocator removal and a number of subsequent SLUB cleanups and optimizations.
2 parents 31bda71 + 782f890 commit 61d7e36

29 files changed

+906
-5169
lines changed

CREDITS

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@
99
Linus
1010
----------
1111

12-
N: Matt Mackal
13-
E: mpm@selenic.com
14-
D: SLOB slab allocator
15-
1612
N: Matti Aarnio
1713
E: mea@nic.funet.fi
1814
D: Alpha systems hacking, IPv6 and other network related stuff
@@ -1572,6 +1568,10 @@ S: Ampferstr. 50 / 4
15721568
S: 6020 Innsbruck
15731569
S: Austria
15741570

1571+
N: Mark Hemment
1572+
E: markhe@nextd.demon.co.uk
1573+
D: SLAB allocator implementation
1574+
15751575
N: Richard Henderson
15761576
E: rth@twiddle.net
15771577
E: rth@cygnus.com
@@ -2437,6 +2437,10 @@ D: work on suspend-to-ram/disk, killing duplicates from ioctl32,
24372437
D: Altera SoCFPGA and Nokia N900 support.
24382438
S: Czech Republic
24392439

2440+
N: Olivia Mackall
2441+
E: olivia@selenic.com
2442+
D: SLOB slab allocator
2443+
24402444
N: Paul Mackerras
24412445
E: paulus@samba.org
24422446
D: PPP driver

Documentation/core-api/mm-api.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ The Slab Cache
3737
.. kernel-doc:: include/linux/slab.h
3838
:internal:
3939

40-
.. kernel-doc:: mm/slab.c
40+
.. kernel-doc:: mm/slub.c
4141
:export:
4242

4343
.. kernel-doc:: mm/slab_common.c

arch/arm64/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ config ARM64
154154
select HAVE_MOVE_PUD
155155
select HAVE_PCI
156156
select HAVE_ACPI_APEI if (ACPI && EFI)
157-
select HAVE_ALIGNED_STRUCT_PAGE if SLUB
157+
select HAVE_ALIGNED_STRUCT_PAGE
158158
select HAVE_ARCH_AUDITSYSCALL
159159
select HAVE_ARCH_BITREVERSE
160160
select HAVE_ARCH_COMPILER_H

arch/s390/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ config S390
146146
select GENERIC_TIME_VSYSCALL
147147
select GENERIC_VDSO_TIME_NS
148148
select GENERIC_IOREMAP if PCI
149-
select HAVE_ALIGNED_STRUCT_PAGE if SLUB
149+
select HAVE_ALIGNED_STRUCT_PAGE
150150
select HAVE_ARCH_AUDITSYSCALL
151151
select HAVE_ARCH_JUMP_LABEL
152152
select HAVE_ARCH_JUMP_LABEL_RELATIVE

arch/x86/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ config X86
169169
select HAS_IOPORT
170170
select HAVE_ACPI_APEI if ACPI
171171
select HAVE_ACPI_APEI_NMI if ACPI
172-
select HAVE_ALIGNED_STRUCT_PAGE if SLUB
172+
select HAVE_ALIGNED_STRUCT_PAGE
173173
select HAVE_ARCH_AUDITSYSCALL
174174
select HAVE_ARCH_HUGE_VMAP if X86_64 || X86_PAE
175175
select HAVE_ARCH_HUGE_VMALLOC if X86_64

include/linux/cpuhotplug.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ enum cpuhp_state {
108108
CPUHP_X2APIC_PREPARE,
109109
CPUHP_SMPCFD_PREPARE,
110110
CPUHP_RELAY_PREPARE,
111-
CPUHP_SLAB_PREPARE,
112111
CPUHP_MD_RAID5_PREPARE,
113112
CPUHP_RCUTREE_PREP,
114113
CPUHP_CPUIDLE_COUPLED_PREPARE,

include/linux/slab.h

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
/*
2626
* Flags to pass to kmem_cache_create().
27-
* The ones marked DEBUG are only valid if CONFIG_DEBUG_SLAB is set.
27+
* The ones marked DEBUG need CONFIG_SLUB_DEBUG enabled, otherwise are no-op
2828
*/
2929
/* DEBUG: Perform (expensive) checks on alloc/free */
3030
#define SLAB_CONSISTENCY_CHECKS ((slab_flags_t __force)0x00000100U)
@@ -302,25 +302,15 @@ static inline unsigned int arch_slab_minalign(void)
302302
* Kmalloc array related definitions
303303
*/
304304

305-
#ifdef CONFIG_SLAB
306305
/*
307-
* SLAB and SLUB directly allocates requests fitting in to an order-1 page
306+
* SLUB directly allocates requests fitting in to an order-1 page
308307
* (PAGE_SIZE*2). Larger requests are passed to the page allocator.
309308
*/
310309
#define KMALLOC_SHIFT_HIGH (PAGE_SHIFT + 1)
311310
#define KMALLOC_SHIFT_MAX (MAX_ORDER + PAGE_SHIFT)
312311
#ifndef KMALLOC_SHIFT_LOW
313-
#define KMALLOC_SHIFT_LOW 5
314-
#endif
315-
#endif
316-
317-
#ifdef CONFIG_SLUB
318-
#define KMALLOC_SHIFT_HIGH (PAGE_SHIFT + 1)
319-
#define KMALLOC_SHIFT_MAX (MAX_ORDER + PAGE_SHIFT)
320-
#ifndef KMALLOC_SHIFT_LOW
321312
#define KMALLOC_SHIFT_LOW 3
322313
#endif
323-
#endif
324314

325315
/* Maximum allocatable size */
326316
#define KMALLOC_MAX_SIZE (1UL << KMALLOC_SHIFT_MAX)
@@ -788,12 +778,4 @@ size_t kmalloc_size_roundup(size_t size);
788778

789779
void __init kmem_cache_init_late(void);
790780

791-
#if defined(CONFIG_SMP) && defined(CONFIG_SLAB)
792-
int slab_prepare_cpu(unsigned int cpu);
793-
int slab_dead_cpu(unsigned int cpu);
794-
#else
795-
#define slab_prepare_cpu NULL
796-
#define slab_dead_cpu NULL
797-
#endif
798-
799781
#endif /* _LINUX_SLAB_H */

include/linux/slab_def.h

Lines changed: 0 additions & 124 deletions
This file was deleted.

0 commit comments

Comments
 (0)