提交 549f2bf5 编写于 作者: H Heiko Carstens 提交者: Martin Schwidefsky

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: NHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 466178fc
#include <linux/seq_file.h> #include <linux/seq_file.h>
#include <linux/debugfs.h> #include <linux/debugfs.h>
#include <linux/sched.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <asm/sections.h> #include <asm/sections.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
...@@ -187,6 +188,7 @@ static void walk_pgd_level(struct seq_file *m) ...@@ -187,6 +188,7 @@ static void walk_pgd_level(struct seq_file *m)
else else
note_page(m, &st, _PAGE_INVALID, 1); note_page(m, &st, _PAGE_INVALID, 1);
addr += PGDIR_SIZE; addr += PGDIR_SIZE;
cond_resched();
} }
/* Flush out the last page */ /* Flush out the last page */
st.current_address = max_addr; st.current_address = max_addr;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册