linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <levinsasha928@gmail.com>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: paulmck@linux.vnet.ibm.com,
	Michael Wang <wangyun@linux.vnet.ibm.com>,
	Dave Jones <davej@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: RCU idle CPU detection is broken in linux-next
Date: Tue, 25 Sep 2012 00:47:55 +0200	[thread overview]
Message-ID: <5060E31B.3070203@gmail.com> (raw)
In-Reply-To: <CAFTL4hwqzS8iO2zOOGaizzMtT85MJExTxEgGbponJ4_gfv0nwA@mail.gmail.com>

Hi Frederic,

On 09/24/2012 11:29 PM, Frederic Weisbecker wrote:
> Sasha,
> 
> Can you please test the following branch:
> 
> git://github.com/fweisbec/linux-dynticks.git  rcu/idle-for-v3.7-take3
> 
> with CONFIG_RCU_USER_QS and CONFIG_RCU_USER_QS_FORCE enabled.
> 
> I hope this fixes the warning.
> The changes are:
> 
> * add "x86: Unspaghettize do_general_protection()"
> * updated "x86: Exception hooks for userspace RCU extended QS" to
> handle some missed trap handlers. Especially do_general_protection()
> because I can see the problem triggered there in Sasha's warnings. I
> fixed more handlers in the way.

I've tested the branch above, and noticed two things:

 - I had merge conflicts when pulling it on top of latest linux-next which I've resolved:

diff --cc arch/x86/kernel/traps.c
index 1ba4850,cb20776..386b079
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@@ -644,8 -646,7 +647,9 @@@ EXPORT_SYMBOL_GPL(math_state_restore)
  dotraplinkage void __kprobes
  do_device_not_available(struct pt_regs *regs, long error_code)
  {
 +      BUG_ON(use_eager_fpu());
 +
+       exception_enter(regs);
  #ifdef CONFIG_MATH_EMULATION
        if (read_cr0() & X86_CR0_EM) {
                struct math_emu_info info = { };

 - While I no longer see the warnings I've originally noticed, if I run with Paul's last debug patch I see the following warning:

[  212.200137] WARNING: at arch/x86/kernel/process.c:392 cpu_idle+0x12a/0x1f0()
[  212.200141] Pid: 0, comm: swapper/3 Tainted: G        W    3.6.0-rc6-next-20120924-sasha-00030-g71f256c #5
[  212.200142] Call Trace:
[  212.200146]  [<ffffffff810799da>] ? cpu_idle+0x12a/0x1f0
[  212.200150]  [<ffffffff811078b6>] warn_slowpath_common+0x86/0xb0
[  212.200153]  [<ffffffff811079a5>] warn_slowpath_null+0x15/0x20
[  212.200156]  [<ffffffff810799da>] cpu_idle+0x12a/0x1f0
[  212.200160]  [<ffffffff839a3ee8>] ? setup_APIC_timer+0xb2/0xb6

Which is triggered by:
                        if (cpuidle_idle_call())
                                pm_idle();

                        rcu_idle_exit();
                        WARN_ON(rcu_is_cpu_idle()); <---- THIS
                        start_critical_timings();

                        /* In many cases the interrupt that ended idle
                           has already called exit_idle. But some idle
                           loops can be woken up without interrupt. */
                        WARN_ON(rcu_is_cpu_idle());
                        __exit_idle();
                        WARN_ON(rcu_is_cpu_idle());


Thanks,
Sasha

  reply	other threads:[~2012-09-24 22:47 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-12 17:56 RCU idle CPU detection is broken in linux-next Sasha Levin
2012-09-19 15:39 ` Paul E. McKenney
2012-09-19 16:35   ` Sasha Levin
2012-09-19 17:06     ` Paul E. McKenney
2012-09-19 22:27       ` Sasha Levin
2012-09-20  7:33       ` Michael Wang
2012-09-20  7:44         ` Sasha Levin
2012-09-20  8:14           ` Michael Wang
2012-09-20 15:23           ` Paul E. McKenney
2012-09-21  9:30             ` Sasha Levin
2012-09-21 12:13               ` Paul E. McKenney
2012-09-21 13:26                 ` Sasha Levin
2012-09-21 15:12                   ` Paul E. McKenney
2012-09-21 15:18                     ` Sasha Levin
2012-09-22  8:26                       ` Sasha Levin
2012-09-22 15:09                         ` Paul E. McKenney
2012-09-22 15:20                           ` Paul E. McKenney
2012-09-22 15:40                           ` Sasha Levin
2012-09-22 15:56                             ` Paul E. McKenney
2012-09-22 17:50                               ` Sasha Levin
2012-09-22 21:27                                 ` Paul E. McKenney
2012-09-23  0:21                                   ` Paul E. McKenney
2012-09-23  5:39                                     ` Sasha Levin
2012-09-24 21:29                                       ` Frederic Weisbecker
2012-09-24 22:47                                         ` Sasha Levin [this message]
2012-09-24 22:54                                           ` Sasha Levin
2012-09-24 23:06                                             ` Frederic Weisbecker
2012-09-24 23:10                                               ` Sasha Levin
2012-09-24 23:35                                                 ` Frederic Weisbecker
2012-09-24 23:41                                                   ` Frederic Weisbecker
2012-09-25  4:04                                                     ` Paul E. McKenney
2012-09-25 11:59                                                       ` Frederic Weisbecker
2012-09-25 13:04                                                         ` Paul E. McKenney
2012-09-26 14:56                                                           ` Frederic Weisbecker
2012-09-26 16:26                                                             ` Paul E. McKenney
2012-09-25 12:06                                                 ` Frederic Weisbecker
2012-09-25 18:28                                                   ` Sasha Levin
2012-09-25 18:36                                                     ` Paul E. McKenney
2012-09-26 15:46                                                       ` Frederic Weisbecker
2012-09-26 16:59                                                         ` Paul E. McKenney
2012-09-26 14:58                                                     ` Frederic Weisbecker

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=5060E31B.3070203@gmail.com \
    --to=levinsasha928@gmail.com \
    --cc=davej@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=wangyun@linux.vnet.ibm.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;
as well as URLs for NNTP newsgroup(s).