From: Anders Roxell <anders.roxell@linaro.org> To: rostedt@goodmis.org, mingo@redhat.com Cc: akpm@linux-foundation.org, dvyukov@google.com, linux-kernel@vger.kernel.org, Anders Roxell <anders.roxell@linaro.org>, Arnd Bergmann <arnd@arndb.de> Subject: [PATCH 2/2] kernel/trace: fix watchdog soft lockup Date: Wed, 28 Nov 2018 09:13:34 +0100 Message-ID: <20181128081334.18408-1-anders.roxell@linaro.org> (raw) When building a allmodconfig kernel for arm64 and boot that in qemu, CONFIG_FTRACE_STARTUP_TEST gets enabled and that takes time so the watchdog expires and prints out a message like this: 'watchdog: BUG: soft lockup - CPU#0 stuck for 22s! [swapper/0:1]' Each time the function ftrace_replace_code gets called it stays in that functions loop for 41424 times. Rework so that function cond_resched() gets called in the ftrace_replace_code loop. Co-developed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Anders Roxell <anders.roxell@linaro.org> --- kernel/trace/ftrace.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 5b4f73e4fd56..3f456921dedf 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -2426,6 +2426,10 @@ void __weak ftrace_replace_code(int enable) do_for_each_ftrace_rec(pg, rec) { + /* This loop can take minutes when sanitizers are enabled, so + * lets make sure we allow RCU processing. + */ + cond_resched(); if (rec->flags & FTRACE_FL_DISABLED) continue; -- 2.19.2
next reply index Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-11-28 8:13 Anders Roxell [this message] 2018-11-28 14:09 ` Steven Rostedt 2018-11-28 22:24 ` Arnd Bergmann 2018-11-29 3:24 ` Steven Rostedt
Reply instructions: You may reply publically to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20181128081334.18408-1-anders.roxell@linaro.org \ --to=anders.roxell@linaro.org \ --cc=akpm@linux-foundation.org \ --cc=arnd@arndb.de \ --cc=dvyukov@google.com \ --cc=linux-kernel@vger.kernel.org \ --cc=mingo@redhat.com \ --cc=rostedt@goodmis.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
LKML Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \ linux-kernel@vger.kernel.org linux-kernel@archiver.kernel.org public-inbox-index lkml Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel AGPL code for this site: git clone https://public-inbox.org/ public-inbox