mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Justin Mattock" <justinmattock@gmail.com>
To: "Andrew Morton" <akpm@linux-foundation.org>
Cc: "Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Venkatesh Pallipadi" <venkatesh.pallipadi@intel.com>,
	"Ingo Molnar" <mingo@elte.hu>
Subject: Re: spinlock lockup on CPU#0
Date: Sat, 26 Apr 2008 18:39:06 +0000	[thread overview]
Message-ID: <dd18b0c30804261139s7ab20704l5d86e2ddd65f34a3@mail.gmail.com> (raw)
In-Reply-To: <20080426112907.77613dee.akpm@linux-foundation.org>

On Sat, Apr 26, 2008 at 6:29 PM, Andrew Morton
<akpm@linux-foundation.org> wrote:
>
> On Thu, 24 Apr 2008 01:41:32 +0000 "Justin Mattock" <justinmattock@gmail.com> wrote:
>
>  > Hello, I recorded a .mov of a spinlock, but cant seem to send it out,
>  > so I have to manually write it down:
>  >
>  > BUG: spinlock lockup on CPU#0, swapper/0, c17fa6c0
>  > Pid: 0. swapper Not tainted 2.6.25-03562-g3dc5063 #1
>  > [<c0219fbb>]  _raw_spin_lock+0xd5/0xf9
>  > [<c0377c6b>] _spin_lock+0x8/0xa
>  > [<c011cdce>]  task_rq_lock+0x44/0x6b
>  > [<c011cfb4>]   try_to_wake+0x2a/0x1c4
>  > [<co11d159>]  default_wake_function+0xb/0xd
>  > [<co118847>] __wake_up_common+0x2f/0x5a
>  > [<c011bc11>] complete+0x2b/0x3e
>  > [<c02ad79a>] usb_api_blocking_completion+0x13/0x15
>  > [<c02abadc>] usb_hcd_giveback_urb+0x52/0x82
>  > [<f88686c7>] ehci_urb_done+0x6f/0x7c [ehci_hcd]
>  > [<f8869614>] qh_completions+0x2d7/0x348 [ehci_hcd]
>  > [<f8869721>] ehci_work+0x9c [ehci_hcd]
>  > [<c0107c35>] ? sched_clock+0xb/0x1c
>  > [<c0119bec>] ? __update_rq_clock+0x94/0x15a
>  > [<f886c827>] ehci_irq+0x138/0x15f [ehci_hcd]
>  > [<c02abd9> ] usb_hcd_irq+0x23/0x51
>  > [<c0151c43>] handle_IRQ_event+0x2a/0x5a
>  > [<c0152d2c>] handle_fasteoi_irq+0x74/0xb6
>  > [<c01058c5>] do_IRQ+0x71/0x8c
>  > [<c01042f7>] common_interrupt+0x23/0x28
>  > [<c011fb07>] ? sched_clock_idle_wakeup_event+0x5b/0x74
>  > [<c02cc212>] acpi_idle_enter_bm+0x2a4/0x31f    [processor]
>  > [<c02cc212>] cpuidle_idle_call+0x5c/0x8c
>  > [<c02cc1b4>] ? cpuidle_idle_call+0x0/0x8c
>  > [<c0102571>] cpu_idle+0xb1/0xd1
>  > [<c036b371>] reset_init+0x49/0x4b
>  > =====================================================
>  >
>  >
>  > Hopefully the numbers are right, and hopefully this provides enough
>  > info to help the kernel out
>
>  Well that's cute.  At a guess I'd say that acpi_processor_idle() managed to
>  call sched_clock_idle_wakeup_event() with local interrupts enabled.  We
>  took an interrupt with rq->lock held and things went downhill from there.
>
>  Can you add this please, see if it triggers?
>
>
>  --- a/kernel/sched.c~a
>  +++ a/kernel/sched.c
>  @@ -811,6 +811,7 @@ void sched_clock_idle_sleep_event(void)
>   {
>         struct rq *rq = cpu_rq(smp_processor_id());
>
>  +       WARN_ON(!irqs_disabled());
>         spin_lock(&rq->lock);
>         __update_rq_clock(rq);
>         spin_unlock(&rq->lock);
>  @@ -826,6 +827,7 @@ void sched_clock_idle_wakeup_event(u64 d
>         struct rq *rq = cpu_rq(smp_processor_id());
>         u64 now = sched_clock();
>
>  +       WARN_ON(!irqs_disabled());
>         rq->idle_clock += delta_ns;
>         /*
>          * Override the previous timestamp and ignore all
>  _
>
>

Yeah, I dont mind adding this to see what happens.
regards

-- 
Justin P. Mattock

  reply	other threads:[~2008-04-26 18:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-24  1:41 Justin Mattock
2008-04-26 18:29 ` Andrew Morton
2008-04-26 18:39   ` Justin Mattock [this message]
2008-04-26 19:14   ` Ingo Molnar
2008-04-26 19:32     ` Justin Mattock
2008-04-26 21:06     ` Bob Copeland
2008-04-26 21:48       ` Justin Mattock
2008-04-28 20:38         ` Venki Pallipadi
2008-04-28 22:02           ` Justin Mattock
2008-04-26 23:04     ` Hugh Dickins
2008-04-26 21:33 Bernard Pidoux
2008-04-27  0:15 ` Bernard Pidoux
2008-04-27  2:00   ` Justin Mattock
2008-04-27  2:13     ` Bob Copeland
2008-04-27  2:20       ` Justin Mattock
2008-04-27  2:41         ` Bob Copeland
2008-04-27  6:11           ` Justin Mattock

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=dd18b0c30804261139s7ab20704l5d86e2ddd65f34a3@mail.gmail.com \
    --to=justinmattock@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --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®