linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stanislaw Gruszka <sgruszka-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: poma <pomidorabelisima-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Olaf Hering <olaf-QOLJcTWqO2uzQB+pC5nmwQ@public.gmane.org>,
	Mailing-List fedora-kernel
	<kernel-TuqUDEhatI4ANWPb/1PvSmm0pvjS0E/A@public.gmane.org>,
	linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Josh Boyer <jwboyer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Linux Kernel list
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"Justin M. Forbes"
	<jforbes-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
Subject: Re: WARNING: CPU: 1 PID: 0 at kernel/time/tick-broadcast.c:668 tick_broadcast_oneshot_control+0x17d/0x190()
Date: Tue, 11 Feb 2014 09:23:08 +0100	[thread overview]
Message-ID: <20140211082306.GA1528@redhat.com> (raw)
In-Reply-To: <52F9219B.5020003-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

On Mon, Feb 10, 2014 at 07:59:39PM +0100, poma wrote:
> On 10.02.2014 11:06, Thomas Gleixner wrote:
> > On Mon, 10 Feb 2014, poma wrote:
> > 
> >> [   83.558551]  [<ffffffff81025b17>] amd_e400_idle+0x87/0x130
> > 
> > So this seems to happen only on AMD machines which use that e400 idle
> > mode. I have no idea at the moment whats wrong there. I'll find one of
> > those machines and try to reproduce.

I tried to debug that warn as well. Even if I found machine with proper
family and model number, HW C1E bug do not happen there, hence I just
hack kernel to always use amd_e400_idle (and remove AMD rdmsr specific
instructions to do not crash). That make issue 100% reproducible when
suspend/resume.

It happens when cpu become idle, call CLOCK_EVT_NOTIFY_BROADCAST_ENTER,
but before CLOCK_EVT_NOTIFY_BROADCAST_EXIT, interrupt trigger on that
cpu. IRQ is handled by hrtimer code, which want to switch to hres and
call:

tick_switch_to_oneshot() -> ... -> tick_broadcast_setup_oneshot()

Since we have already proper handler there, last procedure clear
tick_broadcast_oneshot_mask, but tick_broadcast_pending_mask stay
set. When amd_e400_idle next time call CLOCK_EVT_NOTIFY_BROADCAST_ENTER,
the warning will happen.

I came with a below patch, which also clear pending mask, but perhaps
oneshot_mask should not be cleared on tick_broadcast_setup_oneshot(),
or should be cleared only conditionally, or some other solution is
needed. Anyway, patch make the warning gone on my hacked setup, I was
waiting for testing results on real C1E hardware.

Thanks
Stanislaw

diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
index 43780ab..98977a5 100644
--- a/kernel/time/tick-broadcast.c
+++ b/kernel/time/tick-broadcast.c
@@ -756,6 +756,7 @@ out:
 static void tick_broadcast_clear_oneshot(int cpu)
 {
 	cpumask_clear_cpu(cpu, tick_broadcast_oneshot_mask);
+	cpumask_clear_cpu(cpu, tick_broadcast_pending_mask);
 }
 
 static void tick_broadcast_init_next_event(struct cpumask *mask,
_______________________________________________
kernel mailing list
kernel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/kernel

  parent reply	other threads:[~2014-02-11  8:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-10  3:42 WARNING: CPU: 1 PID: 0 at kernel/time/tick-broadcast.c:668 tick_broadcast_oneshot_control+0x17d/0x190() poma
2014-02-10 10:06 ` Thomas Gleixner
     [not found]   ` <alpine.DEB.2.02.1402101056260.21991-3cz04HxQygjZikZi3RtOZ1XZhhPuCNm+@public.gmane.org>
2014-02-10 18:59     ` poma
     [not found]       ` <52F9219B.5020003-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-02-11  8:23         ` Stanislaw Gruszka [this message]
2014-02-11 16:07           ` Thomas Gleixner
     [not found]             ` <alpine.DEB.2.02.1402111702090.21991-3cz04HxQygjZikZi3RtOZ1XZhhPuCNm+@public.gmane.org>
2014-02-11 16:27               ` Stanislaw Gruszka
2014-02-11 14:25   ` Thomas Gleixner
     [not found]     ` <alpine.DEB.2.02.1402111434180.21991-3cz04HxQygjZikZi3RtOZ1XZhhPuCNm+@public.gmane.org>
2014-02-11 20:44       ` poma

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=20140211082306.GA1528@redhat.com \
    --to=sgruszka-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=jforbes-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=jwboyer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=kernel-TuqUDEhatI4ANWPb/1PvSmm0pvjS0E/A@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=olaf-QOLJcTWqO2uzQB+pC5nmwQ@public.gmane.org \
    --cc=pomidorabelisima-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.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;
as well as URLs for NNTP newsgroup(s).