Skip to content

Commit cdeeaab

Browse files
committed
mm, slab: deprecate SLAB_MEM_SPREAD flag
The SLAB_MEM_SPREAD flag used to be implemented in SLAB, which was removed. SLUB instead relies on the page allocator's NUMA policies. Change the flag's value to 0 to free up the value it had, and mark it for full removal once all users are gone. Reported-by: Steven Rostedt <[email protected]> Closes: https://lore.kernel.org/all/[email protected]/ Reviewed-and-tested-by: Xiongwei Song <[email protected]> Reviewed-by: Chengming Zhou <[email protected]> Reviewed-by: Roman Gushchin <[email protected]> Acked-by: David Rientjes <[email protected]> Signed-off-by: Vlastimil Babka <[email protected]>
1 parent 6613476 commit cdeeaab

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

include/linux/slab.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,6 @@
9696
*/
9797
/* Defer freeing slabs to RCU */
9898
#define SLAB_TYPESAFE_BY_RCU ((slab_flags_t __force)0x00080000U)
99-
/* Spread some memory over cpuset */
100-
#define SLAB_MEM_SPREAD ((slab_flags_t __force)0x00100000U)
10199
/* Trace allocations and frees */
102100
#define SLAB_TRACE ((slab_flags_t __force)0x00200000U)
103101

@@ -164,6 +162,9 @@
164162
#endif
165163
#define SLAB_TEMPORARY SLAB_RECLAIM_ACCOUNT /* Objects are short-lived */
166164

165+
/* Obsolete unused flag, to be removed */
166+
#define SLAB_MEM_SPREAD ((slab_flags_t __force)0U)
167+
167168
/*
168169
* ZERO_SIZE_PTR will be returned for zero sized kmalloc requests.
169170
*

mm/slab.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,6 @@ static inline bool is_kmalloc_cache(struct kmem_cache *s)
469469
SLAB_STORE_USER | \
470470
SLAB_TRACE | \
471471
SLAB_CONSISTENCY_CHECKS | \
472-
SLAB_MEM_SPREAD | \
473472
SLAB_NOLEAKTRACE | \
474473
SLAB_RECLAIM_ACCOUNT | \
475474
SLAB_TEMPORARY | \

0 commit comments

Comments
 (0)