mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-29 09:12:07 +00:00
mm/madvise: don't forget to leave lazy MMU mode in madvise_cold_or_pageout_pte_range()
We need to leave lazy MMU mode before unlocking.
Link: https://lkml.kernel.org/r/20240126032608.355899-1-senozhatsky@chromium.org
Fixes: b2f557a21b
("mm/madvise: add cond_resched() in madvise_cold_or_pageout_pte_range()")
Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Jiexun Wang <wangjiexun@tinylab.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
e870920bbe
commit
4c2da3188b
@ -429,6 +429,7 @@ static int madvise_cold_or_pageout_pte_range(pmd_t *pmd,
|
||||
if (++batch_count == SWAP_CLUSTER_MAX) {
|
||||
batch_count = 0;
|
||||
if (need_resched()) {
|
||||
arch_leave_lazy_mmu_mode();
|
||||
pte_unmap_unlock(start_pte, ptl);
|
||||
cond_resched();
|
||||
goto restart;
|
||||
|
Loading…
Reference in New Issue
Block a user