From: Steven Rostedt <rostedt@goodmis.org>
To: Xiao Yang <yangx.jy@cn.fujitsu.com>
Cc: "Joel Fernandes (Google)" <joel@joelfernandes.org>,
<linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@redhat.com>
Subject: Re: [PATCH] kernel/trace: Stop and wait for kthread on preempt irq module unload
Date: Tue, 28 Apr 2020 10:44:09 -0400 [thread overview]
Message-ID: <20200428104409.0995ceb0@gandalf.local.home> (raw)
In-Reply-To: <5EA80319.7080005@cn.fujitsu.com>
On Tue, 28 Apr 2020 18:19:05 +0800
Xiao Yang <yangx.jy@cn.fujitsu.com> wrote:
> Hi Joel,
>
> Thanks for your quick fix.
>
> Unfortunately, it fixes my original panic but introduces other
> issues(two wanings and one panic) on my arm64 vm, as below:
>
Does the following on top of Joel's patch fix it?
-- Steve
diff --git a/kernel/trace/preemptirq_delay_test.c b/kernel/trace/preemptirq_delay_test.c
index 1c28ca20e30b..6d9131ae7e8c 100644
--- a/kernel/trace/preemptirq_delay_test.c
+++ b/kernel/trace/preemptirq_delay_test.c
@@ -113,15 +113,27 @@ static int preemptirq_delay_run(void *data)
for (i = 0; i < s; i++)
(testfuncs[i])(i);
+
+ while (!kthread_should_stop()) {
+ schedule();
+ set_current_state(TASK_INTERRUPTIBLE);
+ }
+
+ __set_current_state(TASK_RUNNING);
+
return 0;
}
static struct task_struct *preemptirq_start_test(void)
{
+ struct task_struct *task;
char task_name[50];
snprintf(task_name, sizeof(task_name), "%s_test", test_mode);
- return kthread_run(preemptirq_delay_run, NULL, task_name);
+ task = kthread_run(preemptirq_delay_run, NULL, task_name);
+ if (IS_ERR(task))
+ return NULL;
+ return task;
}
next prev parent reply other threads:[~2020-04-28 14:44 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-24 22:36 Joel Fernandes (Google)
2020-04-28 10:19 ` Xiao Yang
2020-04-28 14:15 ` Joel Fernandes
2020-04-29 11:47 ` Xiao Yang
2020-04-28 14:44 ` Steven Rostedt [this message]
2020-04-28 14:45 ` Steven Rostedt
2020-04-29 11:54 ` Xiao Yang
2020-04-29 16:31 ` Steven Rostedt
2020-04-29 19:12 ` Joel Fernandes
2020-05-06 13:38 ` Steven Rostedt
2020-05-06 14:30 ` [PATCH] tracing: Wait for preempt irq delay thread to finish Steven Rostedt
2020-05-07 10:05 ` Xiao Yang
2020-05-07 12:29 ` joel
2020-04-29 11:37 ` [PATCH] kernel/trace: Stop and wait for kthread on preempt irq module unload Xiao Yang
Reply instructions:
You may reply publicly 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=20200428104409.0995ceb0@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=joel@joelfernandes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=yangx.jy@cn.fujitsu.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®