projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aa1b948
)
khugepaged: simplify the allocation of slab caches
author
Hongfu Li
<lihongfu@kylinos.cn>
Tue, 18 Jun 2024 01:45:17 +0000
(09:45 +0800)
committer
Andrew Morton
<akpm@linux-foundation.org>
Thu, 4 Jul 2024 02:30:15 +0000
(19:30 -0700)
Use the new KMEM_CACHE() macro instead of direct kmem_cache_create
to simplify the creation of SLAB caches.
Link:
https://lkml.kernel.org/r/20240618014517.25954-1-lihongfu@kylinos.cn
Signed-off-by: Hongfu Li <lihongfu@kylinos.cn>
Acked-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/khugepaged.c
patch
|
blob
|
history
diff --git
a/mm/khugepaged.c
b/mm/khugepaged.c
index
774a97e
..
f8d08b4
100644
(file)
--- a/
mm/khugepaged.c
+++ b/
mm/khugepaged.c
@@
-385,10
+385,7
@@
int hugepage_madvise(struct vm_area_struct *vma,
int __init khugepaged_init(void)
{
- mm_slot_cache = kmem_cache_create("khugepaged_mm_slot",
- sizeof(struct khugepaged_mm_slot),
- __alignof__(struct khugepaged_mm_slot),
- 0, NULL);
+ mm_slot_cache = KMEM_CACHE(khugepaged_mm_slot, 0);
if (!mm_slot_cache)
return -ENOMEM;