Skip to contentSkip to conversation

mm/slab: remove outdated comment in create_kmalloc_caches()

PATCH Superseded Sang-Heon Jeon 2 participants 3 messages Nov 4 – Nov 10

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm/slab: remove outdated comment in create_kmalloc_caches()

Since commit 16a1d968358a ("mm/slab: remove mm/slab.c and slab_def.h") removed SLAB, no kmalloc cache is created before create_kmalloc_caches().

So remove the outdated comment.

---
 mm/slab_common.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
mm/slab_common.c +1 -3
index e66c0778ee98..c4a386f0dd90 100644
@@ -1029,9 +1029,7 @@ new_kmalloc_cache(int idx, enum kmalloc_cache_type type)
 }
 
 /*
- * Create the kmalloc array. Some of the regular kmalloc arrays
- * may already have been created because they were needed to
- * enable allocations for slab creation.
+ * Create the kmalloc array.
  */
 void __init create_kmalloc_caches(void)
 {

base-commit: d15d7703166daf7bd62c844a3cb1b3a6279adb4c

Signature · 1 line
2.43.0
maintainer
#1 lore raw
Quoted 15 lines · Sang-Heon Jeon

Since commit 16a1d968358a ("mm/slab: remove mm/slab.c and slab_def.h") removed SLAB, no kmalloc cache is created before create_kmalloc_caches().

So remove the outdated comment.

---
 mm/slab_common.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
mm/slab_common.c +0 -0
index e66c0778ee98..c4a386f0dd90 100644

mm/slab_common.c new_kmalloc_cache(int idx, enum kmalloc_cache_type type) · line 1033

Quoted 8 lines
mm/slab_common.c +1 -3
@@ -1029,9 +1029,7 @@ new_kmalloc_cache(int idx, enum kmalloc_cache_type type)
 }
 
 /*
- * Create the kmalloc array. Some of the regular kmalloc arrays
- * may already have been created because they were needed to
- * enable allocations for slab creation.
+ * Create the kmalloc array.
  */

LGTM, but maybe let's just drop the comment?
The name "create_kmalloc_caches" already covers
"Create the kmalloc array"

Quoted 7 lines
mm/slab_common.c +0 -0
 void __init create_kmalloc_caches(void)
 {

base-commit: d15d7703166daf7bd62c844a3cb1b3a6279adb4c

Signature · 1 line
2.43.0
Signature · 2 lines
Cheers,
Harry / Hyeonggon
#2 lore raw

2026년 11월 10일 (화) 오후 10:37, Harry Yoo <[email protected]>님이 작성:

Quoted 19 lines · Sang-Heon Jeon
Quoted 17 lines

Since commit 16a1d968358a ("mm/slab: remove mm/slab.c and slab_def.h") removed SLAB, no kmalloc cache is created before create_kmalloc_caches().

So remove the outdated comment.

---
 mm/slab_common.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
mm/slab_common.c +0 -0
index e66c0778ee98..c4a386f0dd90 100644
@@ -1029,9 +1029,7 @@ new_kmalloc_cache(int idx, enum kmalloc_cache_type type)
 }
 
Quoted 10 lines

mm/slab_common.c new_kmalloc_cache(int idx, enum kmalloc_cache_type type) · line 1033

Quoted 6 lines
mm/slab_common.c +1 -3
 /*
- * Create the kmalloc array. Some of the regular kmalloc arrays
- * may already have been created because they were needed to
- * enable allocations for slab creation.
+ * Create the kmalloc array.
  */

LGTM, but maybe let's just drop the comment?
The name "create_kmalloc_caches" already covers
"Create the kmalloc array"

I don't have a strong opinion. I'll address it in v2.

Quoted 11 lines
Quoted 7 lines
mm/slab_common.c +0 -0
 void __init create_kmalloc_caches(void)
 {

base-commit: d15d7703166daf7bd62c844a3cb1b3a6279adb4c --
2.43.0

--
Cheers,
Harry / Hyeonggon