From: Heiko Carstens Date: Mon, 13 Feb 2017 14:20:18 +0000 (+0100) Subject: s390/mm: add cond_resched call to kernel page table dumper X-Git-Tag: v5.15~11848^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=549f2bf594782faa440055255831c9a51940a651;p=platform%2Fkernel%2Flinux-starfive.git s390/mm: add cond_resched call to kernel page table dumper 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 Signed-off-by: Martin Schwidefsky --- diff --git a/arch/s390/mm/dump_pagetables.c b/arch/s390/mm/dump_pagetables.c index 145a0cc..1b553d8 100644 --- a/arch/s390/mm/dump_pagetables.c +++ b/arch/s390/mm/dump_pagetables.c @@ -1,5 +1,6 @@ #include #include +#include #include #include #include @@ -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;