mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yong Zhang <yong.zhang0@gmail.com>
To: Michal Schmidt <mschmidt@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>,
	Maciej Rutecki <maciej.rutecki@gmail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"Rafael J. Wysocki" <rjw@sisk.pl>,
	clemens@ladisch.de, venkatesh.pallipadi@intel.com,
	gregkh@suse.de
Subject: Re: [2.6.31-git17] WARNING: at kernel/hrtimer.c:648  hres_timers_resume+0x40/0x50()/WARNING: at drivers/base/sys.c:353  __sysdev_resume+0xc3/0xe0()
Date: Wed, 30 Sep 2009 16:01:40 +0800	[thread overview]
Message-ID: <2674af740909300101x2ef4bbdewc12d52e703bdadf@mail.gmail.com> (raw)
In-Reply-To: <20090930095043.48e7081f@hammerfall>

On Wed, Sep 30, 2009 at 3:50 PM, Michal Schmidt <mschmidt@redhat.com> wrote:
> Dne Tue, 29 Sep 2009 17:31:43 +0800
> Yong Zhang <yong.zhang0@gmail.com> napsal(a):
>
>> On Tue, Sep 29, 2009 at 3:24 PM, Ingo Molnar <mingo@elte.hu> wrote:
>> > Could you try this with .32-rc1? This commit should have fixed the
>> > message above:
>> >
>> > 89133f9: clocksource: Resume clocksource without taking the
>> > clocksource mutex
>> >
>>
>> Hi Ingo,
>>
>> Indeed, Maciej said this issue is gone with .32-rc1. But I don't think
>> this is the same
>> issue with 89133f9 because in this one timekeeping_resume() is called
>> with irq enabled.
>> This is very odd and the bug exists in other parts.
>
> It is the same issue. Maciej has CONFIG_PREEMPT_VOLUNTARY=y which means
> taking the mutex in clocksource_resume() could have called into
> schedule(), thus enabling irqs.
>

>From my previous mail, I have ask Maciej to test the blow patch:
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index fb0f46f..4a00a1a 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -569,6 +569,9 @@ static int timekeeping_resume(struct sys_device *dev)
       unsigned long flags;
       struct timespec ts;

+       WARN_ONCE(!irqs_disabled(),
+               KERN_INFO "timekeeping_resume() called with IRQs enabled!");
+
       read_persistent_clock(&ts);

       clocksource_resume();

And indeed, the warning is showed. That means irq is enabled before
entering timekeeping_resume().
So is there other way to call clocksource_resume() and lead to this issue?

Best Regards,
Yong

> Michal
>

  reply	other threads:[~2009-09-30  8:01 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-27  8:05 Maciej Rutecki
2009-09-27  8:27 ` Yong Zhang
2009-09-27  8:30   ` Yong Zhang
2009-09-27 10:25     ` Maciej Rutecki
2009-09-27 14:01       ` Yong Zhang
2009-09-27 14:49         ` Yong Zhang
2009-09-27 15:40           ` Rafael J. Wysocki
2009-09-27 16:16           ` Maciej Rutecki
2009-09-27 18:17             ` Rafael J. Wysocki
2009-09-28  1:54             ` Yong Zhang
2009-09-28 18:38               ` Maciej Rutecki
2009-09-28 20:08                 ` Maciej Rutecki
2009-09-28 21:13                   ` Rafael J. Wysocki
2009-09-29  5:44                 ` Yong Zhang
2009-09-27 15:46         ` Rafael J. Wysocki
2009-09-28  1:53           ` Yong Zhang
2009-09-29  7:24   ` Ingo Molnar
2009-09-29  9:31     ` Yong Zhang
2009-09-30  7:50       ` Michal Schmidt
2009-09-30  8:01         ` Yong Zhang [this message]
2009-09-30  8:20           ` Michal Schmidt
2009-09-30  8:27             ` Yong Zhang
2009-09-29 14:38     ` Maciej Rutecki

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=2674af740909300101x2ef4bbdewc12d52e703bdadf@mail.gmail.com \
    --to=yong.zhang0@gmail.com \
    --cc=clemens@ladisch.de \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maciej.rutecki@gmail.com \
    --cc=mingo@elte.hu \
    --cc=mschmidt@redhat.com \
    --cc=rjw@sisk.pl \
    --cc=venkatesh.pallipadi@intel.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

all inboxes | Powered by JetHome®