Thread (85 messages) 85 messages, 9 authors, 2024-11-05
STALE589d
Revisions (3)
  1. rfc [diff vs current]
  2. v2 current
  3. v4 [diff vs current]

[PATCH v2 32/33] mm/slub: Simplify struct slab slabs field definition

From: Vlastimil Babka <hidden>
Date: 2021-12-01 18:31:51
Also in: linux-patches
Subsystem: memory management, slab allocator, the rest · Maintainers: Andrew Morton, Vlastimil Babka, Harry Yoo, Linus Torvalds

Before commit b47291ef02b0 ("mm, slub: change percpu partial accounting from
objects to pages") we had to fit two integer fields into a native word size, so
we used short int on 32-bit and int on 64-bit via #ifdef. After that commit
there is only one integer field, so we can simply define it as int everywhere.

Signed-off-by: Vlastimil Babka <redacted>
---
 mm/slab.h | 4 ----
 1 file changed, 4 deletions(-)
diff --git a/mm/slab.h b/mm/slab.h
index 8c5a8c005896..ee4344a44987 100644
--- a/mm/slab.h
+++ b/mm/slab.h
@@ -27,11 +27,7 @@ struct slab {
 		struct rcu_head rcu_head;
 		struct {
 			struct slab *next;
-#ifdef CONFIG_64BIT
 			int slabs;	/* Nr of slabs left */
-#else
-			short int slabs;
-#endif
 		};
 	};
 	struct kmem_cache *slab_cache;
-- 
2.33.1

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help