Revert "ANDROID: Use the notifier lock to perform file-backed vma teardown"
This reverts commit dc8ac508af
.
Reason for revert: performance regression.
Bug: 234527424
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I5811c7ee2feac7f9057ed0ccd848e5de71f79354
This commit is contained in:
parent
f25e13c1bc
commit
a16e169d36
|
@ -402,13 +402,6 @@ void vm_area_free(struct vm_area_struct *vma)
|
|||
free_anon_vma_name(vma);
|
||||
#ifdef CONFIG_SPECULATIVE_PAGE_FAULT
|
||||
if (atomic_read(&vma->vm_mm->mm_users) > 1) {
|
||||
if (vma->vm_file) {
|
||||
struct mm_struct *mm = vma->vm_mm;
|
||||
percpu_down_write(mm->mmu_notifier_lock);
|
||||
____vm_area_free(vma);
|
||||
percpu_up_write(mm->mmu_notifier_lock);
|
||||
return;
|
||||
}
|
||||
call_rcu(&vma->vm_rcu, __vm_area_free);
|
||||
return;
|
||||
}
|
||||
|
|
12
mm/memory.c
12
mm/memory.c
|
@ -3988,16 +3988,10 @@ static vm_fault_t __do_fault(struct vm_fault *vmf)
|
|||
/*
|
||||
* The mmap sequence count check guarantees that the
|
||||
* vma we fetched at the start of the fault was still
|
||||
* current at that point in time. The notifier lock
|
||||
* ensures vmf->vma->vm_file stays valid. vma is
|
||||
* stable because we are operating on a copy made at
|
||||
* the start of the fault.
|
||||
* current at that point in time. The rcu read lock
|
||||
* ensures vmf->vma->vm_file stays valid.
|
||||
*/
|
||||
if (mmu_notifier_trylock(vmf->vma->vm_mm)) {
|
||||
ret = vma->vm_ops->fault(vmf);
|
||||
mmu_notifier_unlock(vmf->vma->vm_mm);
|
||||
} else
|
||||
ret = VM_FAULT_RETRY;
|
||||
ret = vma->vm_ops->fault(vmf);
|
||||
}
|
||||
rcu_read_unlock();
|
||||
} else
|
||||
|
|
Loading…
Reference in New Issue