Skip to content

Commit da162e9

Browse files
kiryltorvalds
authored andcommitted
mm: drop zap_details::ignore_dirty
The only user of ignore_dirty is oom-reaper. But it doesn't really use it. ignore_dirty only has effect on file pages mapped with dirty pte. But oom-repear skips shared VMAs, so there's no way we can dirty file pte in them. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Kirill A. Shutemov <[email protected]> Acked-by: Michal Hocko <[email protected]> Cc: Tetsuo Handa <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Rik van Riel <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 685dbf6 commit da162e9

File tree

3 files changed

+1
-9
lines changed

3 files changed

+1
-9
lines changed

include/linux/mm.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1175,7 +1175,6 @@ struct zap_details {
11751175
struct address_space *check_mapping; /* Check page->mapping if set */
11761176
pgoff_t first_index; /* Lowest page->index to unmap */
11771177
pgoff_t last_index; /* Highest page->index to unmap */
1178-
bool ignore_dirty; /* Ignore dirty pages */
11791178
bool check_swap_entries; /* Check also swap entries */
11801179
};
11811180

mm/memory.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1155,12 +1155,6 @@ static unsigned long zap_pte_range(struct mmu_gather *tlb,
11551155

11561156
if (!PageAnon(page)) {
11571157
if (pte_dirty(ptent)) {
1158-
/*
1159-
* oom_reaper cannot tear down dirty
1160-
* pages
1161-
*/
1162-
if (unlikely(details && details->ignore_dirty))
1163-
continue;
11641158
force_flush = 1;
11651159
set_page_dirty(page);
11661160
}

mm/oom_kill.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,8 +465,7 @@ static bool __oom_reap_task_mm(struct task_struct *tsk, struct mm_struct *mm)
465465
{
466466
struct mmu_gather tlb;
467467
struct vm_area_struct *vma;
468-
struct zap_details details = {.check_swap_entries = true,
469-
.ignore_dirty = true};
468+
struct zap_details details = {.check_swap_entries = true};
470469
bool ret = true;
471470

472471
/*

0 commit comments

Comments
 (0)