Revert "ANDROID: 16K: Use vma_area slab cache for pad VMA"

This reverts aosp/I24c5f5d0eb3b06acf506f18f5eb57cd497b13d6d.

Bug: 440210631
Bug: 432564748
Change-Id: I936ae92313fa32fed80efe1bb35c9b4da0afd8d2
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
This commit is contained in:
Kalesh Singh
2025-07-17 16:47:05 -07:00
parent 501f58f107
commit 15b48eb602
2 changed files with 3 additions and 6 deletions
+1 -1
View File
@@ -439,7 +439,7 @@ struct kmem_cache *files_cachep;
struct kmem_cache *fs_cachep;
/* SLAB cache for vm_area_struct structures */
struct kmem_cache *vm_area_cachep;
static struct kmem_cache *vm_area_cachep;
/* SLAB cache for mm_struct structures (tsk->mm) */
static struct kmem_cache *mm_cachep;
+2 -5
View File
@@ -270,9 +270,6 @@ static const struct vm_operations_struct pad_vma_ops = {
.name = pad_vma_name,
};
/* Defined in kernel/fork.c */
extern struct kmem_cache *vm_area_cachep;
/*
* Returns a new VMA representing the padding in @vma;
* returns NULL if no padding in @vma or allocation failed.
@@ -284,7 +281,7 @@ static struct vm_area_struct *get_pad_vma(struct vm_area_struct *vma)
if (!is_pgsize_migration_enabled() || !(vma->vm_flags & VM_PAD_MASK))
return NULL;
pad = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL);
pad = kzalloc(sizeof(struct vm_area_struct), GFP_KERNEL);
if (!pad) {
pr_warn("Page size migration: Failed to allocate padding VMA");
return NULL;
@@ -350,7 +347,7 @@ void show_map_pad_vma(struct vm_area_struct *vma, struct seq_file *m,
else
((show_pad_maps_fn)func)(m, pad);
kmem_cache_free(vm_area_cachep, pad);
kfree(pad);
}
/*