linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Bjørn Mork" <bjorn@mork.no>
To: paulmck@linux.vnet.ibm.com
Cc: Dipankar Sarma <dipankar@in.ibm.com>,
	linux-kernel@vger.kernel.org, rostedt@goodmis.org,
	Thomas Gleixner <tglx@linutronix.de>,
	"Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
Subject: Re: [v3.10-rc1] WARNING: at kernel/rcutree.c:502
Date: Mon, 13 May 2013 16:39:33 +0200	[thread overview]
Message-ID: <87wqr3j656.fsf@nemi.mork.no> (raw)
In-Reply-To: <87sj1rydol.fsf@nemi.mork.no> (=?utf-8?Q?=22Bj=C3=B8rn?= Mork"'s message of "Mon, 13 May 2013 01:35:22 +0200")

[-- Attachment #1: Type: text/plain, Size: 4438 bytes --]

Bjørn Mork <bjorn@mork.no> writes:

> I was unable to recreate the problem in a virtual machine, which is
> slightly suspicious.  And bisecting it ended up pointing to a merge
> commit: 
>
>  commit ab86e974f04b1cd827a9c7c35273834ebcd9ab38
>  Merge: 8700c95 6f7a05d
>  Author: Linus Torvalds <torvalds@linux-foundation.org>
>  Date:   Tue Apr 30 08:15:40 2013 -0700
>
>      Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
>  ..
>
>
> which I don't think makes much sense at all.  The bisect log leading to
> this was:
>
> bjorn@canardo:/usr/local/src/build-tmp/linux$ git bisect log
> # bad: [f722406faae2d073cc1d01063d1123c35425939e] Linux 3.10-rc1
> # good: [c1be5a5b1b355d40e6cf79cc979eb66dafa24ad1] Linux 3.9
> git bisect start 'v3.10-rc1' 'v3.9'
> # bad: [73287a43cc79ca06629a88d1a199cd283f42456a] Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
> git bisect bad 73287a43cc79ca06629a88d1a199cd283f42456a
> # bad: [5d434fcb255dec99189f1c58a06e4f56e12bf77d] Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
> git bisect bad 5d434fcb255dec99189f1c58a06e4f56e12bf77d
> # good: [507ffe4f3840ac24890a8123c702cf1b7fe4d33c] Merge tag 'tty-3.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
> git bisect good 507ffe4f3840ac24890a8123c702cf1b7fe4d33c
> # good: [4a7b4d2360175f67ab2c58effeeb8362a3057c25] x86: pageattr-test: remove srandom32 call
> git bisect good 4a7b4d2360175f67ab2c58effeeb8362a3057c25
> # good: [46d9be3e5eb01f71fc02653755d970247174b400] Merge branch 'for-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
> git bisect good 46d9be3e5eb01f71fc02653755d970247174b400
> # good: [e0972916e8fe943f342b0dd1c9d43dbf5bc261c2] Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
> git bisect good e0972916e8fe943f342b0dd1c9d43dbf5bc261c2
> # bad: [ab86e974f04b1cd827a9c7c35273834ebcd9ab38] Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
> git bisect bad ab86e974f04b1cd827a9c7c35273834ebcd9ab38
> # good: [8700c95adb033843fc163d112b9d21d4fda78018] Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
> git bisect good 8700c95adb033843fc163d112b9d21d4fda78018
> # good: [0ed2aef9b3bffe598045b62a31a50d912eee92d8] Merge branch 'fortglx/3.10/time' of git://git.linaro.org/people/jstultz/linux into timers/core
> git bisect good 0ed2aef9b3bffe598045b62a31a50d912eee92d8
> # good: [8f294b5a139ee4b75e890ad5b443c93d1e558a8b] hrtimer: Add expiry time overflow check in hrtimer_interrupt
> git bisect good 8f294b5a139ee4b75e890ad5b443c93d1e558a8b
> # good: [60cf7ea849e77c8782dee147cfb8c38d1984236e] timer_list: Split timer_list_show_tickdevices
> git bisect good 60cf7ea849e77c8782dee147cfb8c38d1984236e
> # good: [d2054b2c11682495fca41e9d4092e654df63b517] posix-timers: Remove unused variable
> git bisect good d2054b2c11682495fca41e9d4092e654df63b517
> # good: [6402c7dc2a19c19bd8cdc7d80878b850da418942] Merge branch 'linus' into timers/core Reason: Get upstream fixes before adding conflicting code.
> git bisect good 6402c7dc2a19c19bd8cdc7d80878b850da418942
> # good: [6f7a05d7018de222e40ca003721037a530979974] clockevents: Set dummy handler on CPU_DEAD shutdown
> git bisect good 6f7a05d7018de222e40ca003721037a530979974
>
>
> So there it stands.  I have no clue and I don't think I'm able to
> provide any clue for anyone else either.  Given that the problem seems
> to be very consistently reproducible on my laptop, I am a bit puzzled as
> to how the bisect would fail like that.

Hey, hey, hey.  Turns out this wasn't that wrong after all.  That merge
includes a oneline diff in kernel/cpu/idle.c and it *is* actually this
diff which trigger the problem for me.  Reverting it, using the attached
patch, makes the warning go away.  Which means that it had nothing to do
with your RCU changes.

But I haven't the faintest idea how this is supposed to work, or even
how to explain the patch properly, so I think I need some help from
Thomas here.  Unless this makes you understand the real issue?

Thomas, why does powertop trigger the

  WARNING: at kernel/rcutree.c:502 rcu_eqs_exit_common.isra.48+0x3d/0x125()

without the attached patch?  And what is the proper resolution?



Bjørn



[-- Attachment #2: 0001-idle-prevent-rcu_eqs_exit_common-warning.patch --]
[-- Type: text/x-diff, Size: 3494 bytes --]

>From 5ce5497e752980386696c9293b1ae4d703416f38 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= <bjorn@mork.no>
Date: Mon, 13 May 2013 16:03:59 +0200
Subject: [PATCH] idle: prevent rcu_eqs_exit_common warning
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Avoid the following warning when running powertop:

[   49.289034] ------------[ cut here ]------------
[   49.289055] WARNING: at kernel/rcutree.c:502 rcu_eqs_exit_common.isra.48+0x3d/0x125()
[   49.289059] Modules linked in: msr cpufreq_stats xt_multiport iptable_filter ip_tables rfcomm bnep xt_hl binfmt_misc ip6table_filter ip6_tables x_tables nfsd nfs_acl nfs lockd fscache sunrpc 8021q garp stp llc tun cdc_mbim cdc_ncm cdc_wdm usbnet mii loop fuse btusb bluetooth iTCO_wdt iTCO_vendor_support snd_hda_codec_conexant arc4 iwldvm mac80211 thinkpad_acpi nvram snd_seq_midi snd_seq_midi_event snd_rawmidi snd_hda_intel snd_seq snd_hda_codec snd_hwdep snd_pcm_oss snd_mixer_oss iwlwifi snd_pcm coretemp kvm_intel kvm snd_seq_device evdev psmouse serio_raw lpc_ich mfd_core cfg80211 snd_page_alloc i2c_i801 snd_timer snd soundcore rfkill battery ac acpi_cpufreq mperf i915 wmi video i2c_algo_bit drm_kms_helper button drm i2c_core processor ext4 crc16 jbd2 mbcache nbd sg sr_mod cdrom sd_mod crc_t10dif ahci libahci libata microcode scsi_mod ehci_pci uhci_hcd ehci_hcd usbcore usb_common thermal thermal_sys e1000e ptp pps_core
[   49.289244] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.10.0-bisect-rcu-warn+ #107
[   49.289247] Hardware name: LENOVO 2776LEG/2776LEG, BIOS 6EET55WW (3.15 ) 12/19/2011
[   49.289251]  ffffffff8157d8c8 ffffffff81801e28 ffffffff8137e4e3 ffffffff81801e68
[   49.289260]  ffffffff8103094f ffffffff81801e68 0000000000000000 ffff88023afcd9b0
[   49.289268]  0000000000000000 0140000000000000 ffff88023bee7700 ffffffff81801e78
[   49.289276] Call Trace:
[   49.289285]  [<ffffffff8137e4e3>] dump_stack+0x19/0x1b
[   49.289293]  [<ffffffff8103094f>] warn_slowpath_common+0x62/0x7b
[   49.289300]  [<ffffffff8103097d>] warn_slowpath_null+0x15/0x17
[   49.289306]  [<ffffffff810a9006>] rcu_eqs_exit_common.isra.48+0x3d/0x125
[   49.289314]  [<ffffffff81079b49>] ? trace_hardirqs_off_caller+0x37/0xa6
[   49.289320]  [<ffffffff810a9692>] rcu_idle_exit+0x85/0xa8
[   49.289327]  [<ffffffff8107076e>] trace_cpu_idle_rcuidle+0xae/0xff
[   49.289334]  [<ffffffff810708b1>] cpu_startup_entry+0x72/0x115
[   49.289341]  [<ffffffff813689e5>] rest_init+0x149/0x150
[   49.289347]  [<ffffffff8136889c>] ? csum_partial_copy_generic+0x16c/0x16c
[   49.289355]  [<ffffffff81a82d34>] start_kernel+0x3f0/0x3fd
[   49.289362]  [<ffffffff81a8274c>] ? repair_env_string+0x5a/0x5a
[   49.289368]  [<ffffffff81a82481>] x86_64_start_reservations+0x2a/0x2c
[   49.289375]  [<ffffffff81a82550>] x86_64_start_kernel+0xcd/0xd1
[   49.289379] ---[ end trace 07a1cc95e29e9036 ]---

Signed-off-by: Bjørn Mork <bjorn@mork.no>
---
 kernel/cpu/idle.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/cpu/idle.c b/kernel/cpu/idle.c
index 8b86c0c..5b9ef3c 100644
--- a/kernel/cpu/idle.c
+++ b/kernel/cpu/idle.c
@@ -85,7 +85,7 @@ static void cpu_idle_loop(void)
 			 * know that the IPI is going to arrive right
 			 * away
 			 */
-			if (cpu_idle_force_poll || tick_check_broadcast_expired()) {
+			if (cpu_idle_force_poll) {
 				cpu_idle_poll();
 			} else {
 				current_clr_polling();
-- 
1.7.10.4


  reply	other threads:[~2013-05-13 14:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-12  9:08 [v3.10-rc1] WARNING: at kernel/rcutree.c:502 Bjørn Mork
2013-05-12 11:39 ` Paul E. McKenney
2013-05-12 15:55   ` Bjørn Mork
2013-05-12 17:21     ` Paul E. McKenney
2013-05-12 18:19       ` Bjørn Mork
2013-05-12 20:58         ` Paul E. McKenney
2013-05-12 23:35         ` Bjørn Mork
2013-05-13 14:39           ` Bjørn Mork [this message]
2013-05-13 22:31             ` Srivatsa S. Bhat
2013-05-14  7:38               ` Bjørn Mork
2013-05-14  7:46                 ` Srivatsa S. Bhat
2013-05-14  7:51                   ` Srivatsa S. Bhat
2013-05-14  8:20                   ` Bjørn Mork
2013-05-14  8:21                     ` Srivatsa S. Bhat
2013-05-14 10:24               ` Paul E. McKenney
2013-05-14 15:50               ` [tip:core/urgent] rcu/idle: Wrap cpu-idle poll mode within rcu_idle_enter/exit tip-bot for Srivatsa S. Bhat

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=87wqr3j656.fsf@nemi.mork.no \
    --to=bjorn@mork.no \
    --cc=dipankar@in.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=rostedt@goodmis.org \
    --cc=srivatsa.bhat@linux.vnet.ibm.com \
    --cc=tglx@linutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).