Skip to content

Commit

Permalink
s390/mm: add cond_resched call to kernel page table dumper
Browse files Browse the repository at this point in the history
Walking kernel page tables within the kernel page table dumper may
potentially take a lot of time. This may lead to soft lockup warning
messages.
To avoid this add a cond_resched call for each pgd_level iteration.

This is the same as "x86/mm/ptdump: Fix soft lockup in page table
walker" for x86.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed Feb 17, 2017
1 parent 466178f commit 549f2bf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/s390/mm/dump_pagetables.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <linux/seq_file.h>
#include <linux/debugfs.h>
#include <linux/sched.h>
#include <linux/mm.h>
#include <asm/sections.h>
#include <asm/pgtable.h>
Expand Down Expand Up @@ -187,6 +188,7 @@ static void walk_pgd_level(struct seq_file *m)
else
note_page(m, &st, _PAGE_INVALID, 1);
addr += PGDIR_SIZE;
cond_resched();
}
/* Flush out the last page */
st.current_address = max_addr;
Expand Down

0 comments on commit 549f2bf

Please sign in to comment.