From: Peter Zijlstra <peterz@infradead.org>
To: kernel test robot <oliver.sang@intel.com>
Cc: oe-lkp@lists.linux.dev, lkp@intel.com,
linux-kernel@vger.kernel.org, x86@kernel.org,
Ingo Molnar <mingo@kernel.org>,
linux-trace-kernel@vger.kernel.org,
Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [tip:sched/core] [tracing, hardirq] 9aedeaed6f: WARNING:suspicious_RCU_usage
Date: Thu, 19 Jan 2023 16:45:49 +0100 [thread overview]
Message-ID: <Y8llrdNT6RD/0dbq@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <202301192148.58ece903-oliver.sang@intel.com>
On Thu, Jan 19, 2023 at 10:06:21PM +0800, kernel test robot wrote:
>
> Greeting,
>
> FYI, we noticed WARNING:suspicious_RCU_usage due to commit (built with gcc-11):
>
> commit: 9aedeaed6fc6fe8452b9b8225e95cc2b8631ff91 ("tracing, hardirq: No moar _rcuidle() tracing")
> https://git.kernel.org/cgit/linux/kernel/git/tip/tip.git sched/core
>
> [test failed on linux-next/master f3381a7baf5ccbd091eb2c4fd2afd84266fcef24]
>
> in testcase: kernel-selftests
> version: kernel-selftests-x86_64-d4cf28ee-1_20230110
> with following parameters:
>
> group: ftrace
Moo, so I've had these patches in my git tree for months :/
The thing that seems to shut it up is the below, but I'm not entirely
sure how we get there, all the code should be cpuidle/noinstr, which
implies notrace.
Steve, what's the easiest way to figure out what triggers this? Put a
printk() in prepare_ftrace_return() or so?
---
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h
index 3183aeb7f5b4..fecdf0bb3bc4 100644
--- a/include/linux/cpuidle.h
+++ b/include/linux/cpuidle.h
@@ -15,6 +15,7 @@
#include <linux/list.h>
#include <linux/hrtimer.h>
#include <linux/context_tracking.h>
+#include <linux/ftrace.h>
#define CPUIDLE_STATE_MAX 10
#define CPUIDLE_NAME_LEN 16
@@ -119,6 +120,7 @@ DECLARE_PER_CPU(struct cpuidle_device, cpuidle_dev);
static __always_inline void ct_cpuidle_enter(void)
{
lockdep_assert_irqs_disabled();
+ pause_graph_tracing();
/*
* Idle is allowed to (temporary) enable IRQs. It
* will return with IRQs disabled.
@@ -143,6 +145,7 @@ static __always_inline void ct_cpuidle_exit(void)
lockdep_hardirqs_off(_RET_IP_);
ct_idle_exit();
instrumentation_begin();
+ unpause_graph_tracing();
}
/****************************
next prev parent reply other threads:[~2023-01-19 15:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-19 14:06 [tip:sched/core] [tracing, hardirq] 9aedeaed6f: WARNING:suspicious_RCU_usage kernel test robot
2023-01-19 15:45 ` Peter Zijlstra [this message]
2023-01-19 16:24 ` Steven Rostedt
2023-01-20 9:51 ` Peter Zijlstra
2023-01-21 16:49 ` Steven Rostedt
2023-01-31 14:22 ` [tip: sched/core] cpuidle: Fix poll_idle() noinstr annotation tip-bot2 for Peter Zijlstra
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=Y8llrdNT6RD/0dbq@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=mingo@kernel.org \
--cc=oe-lkp@lists.linux.dev \
--cc=oliver.sang@intel.com \
--cc=rostedt@goodmis.org \
--cc=x86@kernel.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
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