From: Frederic Weisbecker <fweisbec@gmail.com>
To: Sasha Levin <levinsasha928@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 14:06:01 +0200 [thread overview]
Message-ID: <20120925120549.GC2310@somewhere.redhat.com> (raw)
In-Reply-To: <5060E863.6020006@gmail.com>
On Tue, Sep 25, 2012 at 01:10:27AM +0200, Sasha Levin wrote:
> On 09/25/2012 01:06 AM, Frederic Weisbecker wrote:
> > 2012/9/25 Sasha Levin <levinsasha928@gmail.com>:
> >> On 09/25/2012 12:47 AM, Sasha Levin wrote:
> >>> - 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:
> >>
> >> Correction: Original warnings are still there, they just got buried in the huge spew that was caused by additional debug warnings
> >> so I've missed them initially.
> >
> > Are they the same? Could you send me your dmesg?
> >
> > Thanks.
> >
>
> Log is attached, you can go directly to 168.703017 when the warnings begin.
Sasha, sorry to burden you with more testing request.
Could you please try out this new branch? It includes some fixes after Wu Fenguang and
Dan Carpenter reports (not related to your warnings though) and a patch on the top
of the pile to ensure I diagnosed well the problem, which return immediately from
rcu_user_*() APIs if we are in an interrupt.
This way we'll have a clearer view. I also would like to know if there are other
problems with the rcu user mode.
Thanks!
Branch is:
git://github.com/fweisbec/linux-dynticks.git
rcu/idle-for-v3.7-take4
Diff is:
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index cb20776..3789675 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -232,8 +232,8 @@ DO_ERROR_INFO(X86_TRAP_AC, SIGBUS, "alignment check", alignment_check,
dotraplinkage void do_stack_segment(struct pt_regs *regs, long error_code)
{
exception_enter(regs);
- if (!notify_die(DIE_TRAP, "stack segment", regs, error_code,
- X86_TRAP_SS, SIGBUS) == NOTIFY_STOP) {
+ if (notify_die(DIE_TRAP, "stack segment", regs, error_code,
+ X86_TRAP_SS, SIGBUS) != NOTIFY_STOP) {
preempt_conditional_sti(regs);
do_trap(X86_TRAP_SS, SIGBUS, "stack segment", regs, error_code, NULL);
preempt_conditional_cli(regs);
@@ -285,8 +285,8 @@ do_general_protection(struct pt_regs *regs, long error_code)
tsk->thread.error_code = error_code;
tsk->thread.trap_nr = X86_TRAP_GP;
- if (!notify_die(DIE_GPF, "general protection fault", regs, error_code,
- X86_TRAP_GP, SIGSEGV) == NOTIFY_STOP)
+ if (notify_die(DIE_GPF, "general protection fault", regs, error_code,
+ X86_TRAP_GP, SIGSEGV) != NOTIFY_STOP)
die("general protection fault", regs, error_code);
goto exit;
}
@@ -678,8 +678,8 @@ dotraplinkage void do_iret_error(struct pt_regs *regs, long error_code)
info.si_errno = 0;
info.si_code = ILL_BADSTK;
info.si_addr = NULL;
- if (!notify_die(DIE_TRAP, "iret exception", regs, error_code,
- X86_TRAP_IRET, SIGILL) == NOTIFY_STOP) {
+ if (notify_die(DIE_TRAP, "iret exception", regs, error_code,
+ X86_TRAP_IRET, SIGILL) != NOTIFY_STOP) {
do_trap(X86_TRAP_IRET, SIGILL, "iret exception", regs, error_code,
&info);
}
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index d249719..e0500c6 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -446,6 +446,9 @@ void rcu_user_enter(void)
WARN_ON_ONCE(!current->mm);
+ if (in_interrupt())
+ return;
+
local_irq_save(flags);
rdtp = &__get_cpu_var(rcu_dynticks);
if (!rdtp->ignore_user_qs && !rdtp->in_user) {
@@ -592,6 +595,9 @@ void rcu_user_exit(void)
unsigned long flags;
struct rcu_dynticks *rdtp;
+ if (in_interrupt())
+ return;
+
local_irq_save(flags);
rdtp = &__get_cpu_var(rcu_dynticks);
if (rdtp->in_user) {
next prev parent reply other threads:[~2012-09-25 12:06 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
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 [this message]
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=20120925120549.GC2310@somewhere.redhat.com \
--to=fweisbec@gmail.com \
--cc=davej@redhat.com \
--cc=levinsasha928@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.