All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Tilman Schmidt <tilman@imap.cc>
Cc: Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>
Subject: [patch] hrtimers: add state tracking, fix
Date: Tue, 19 Dec 2006 20:56:51 +0100	[thread overview]
Message-ID: <20061219195650.GA8797@elte.hu> (raw)
In-Reply-To: <200612191815.kBJIFF4O018306@lx1.pxnet.com>


* Tilman Schmidt <tilman@imap.cc> wrote:

> I tried kernel 2.6.20-rc1-mm1 with the "tickless" option on my P3/933 
> but it has now for the second time in a row caused a system freeze as 
> soon as I left the system idle for a couple of hours. The second time 
> I was warned and switched to a text console before I left the system, 
> and was able to collect this BUG message (copied manually, beware of 
> typos):
> 
> EFLAGS: 00200082   (2.6.20-rc1-mm1-noinitrd #0)
> EIP is at __rb_rotate_right+0x1/0x54
[...]
> Call Trace:
>  [<c021d049>] rb_insert_color+0x55/0xbe
>  [<c012d15b>] enqueue_hrtimer+0x10a/0x116
>  [<c012d9b4>] hrtimer_start+0x78/0x93

thanks for the report - this made me review the hrtimer state engine 
logic, and bingo, it indeed has a nasty typo! Could you try the fix 
below, does it fix your problem? It might explain the crash you are 
seeing, because the typo means we'd ignore HRTIMER_STATE_PENDING state 
(which is rare but possible).

	Ingo

-------------------------->
Subject: [patch] hrtimers: add state tracking, fix
From: Ingo Molnar <mingo@elte.hu>

fix bug in hrtimer_is_queued(), introduced by a cleanup during
the recent refactoring.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 kernel/hrtimer.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux/kernel/hrtimer.c
===================================================================
--- linux.orig/kernel/hrtimer.c
+++ linux/kernel/hrtimer.c
@@ -157,7 +157,7 @@ static void hrtimer_get_softirq_time(str
 static inline int hrtimer_is_queued(struct hrtimer *timer)
 {
 	return timer->state &
-		(HRTIMER_STATE_ENQUEUED || HRTIMER_STATE_PENDING);
+		(HRTIMER_STATE_ENQUEUED | HRTIMER_STATE_PENDING);
 }
 
 /*

  parent reply	other threads:[~2006-12-19 19:59 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-15  6:59 2.6.20-rc1-mm1 Andrew Morton
2006-12-15  6:59 ` BUG: NMI Watchdog detected LOCKUP (was: 2.6.20-rc1-mm1) Tilman Schmidt
2006-12-19 18:52   ` Thomas Gleixner
2006-12-19 19:56   ` Ingo Molnar [this message]
2006-12-20  1:38     ` [patch] hrtimers: add state tracking, fix Tilman Schmidt
2006-12-20 20:05     ` Tilman Schmidt
2006-12-15 14:46 ` OOPS: deref 0x14 at pdc_port_start+0x82 [Was: 2.6.20-rc1-mm1] Jiri Slaby
2006-12-15 19:24   ` Andrew Morton
2006-12-15 22:49     ` Jiri Slaby
2006-12-15 20:39 ` 2.6.20-rc1-mm1 Damien Wyart
2006-12-15 21:01   ` 2.6.20-rc1-mm1 Andrew Morton
2006-12-17 11:07     ` 2.6.20-rc1-mm1 Damien Wyart
2006-12-18  8:03       ` 2.6.20-rc1-mm1 Laurent Riffard
2006-12-18 18:35         ` 2.6.20-rc1-mm1 Damien Wyart
2006-12-19 23:29           ` 2.6.20-rc1-mm1 Luben Tuikov
2006-12-18  7:44     ` 2.6.20-rc1-mm1 Jens Axboe
2006-12-15 23:26 ` WARNING (1) at .../arch/i386/mm/highmem.c:49 [Was: 2.6.20-rc1-mm1] Jiri Slaby
2006-12-16  0:16   ` Andrew Morton
2006-12-16  0:04 ` 2.6.20-rc1-mm1: unused sysrq_timer_list_show() Adrian Bunk
2006-12-16  7:56   ` [patch] debugging feature: SysRq-Q to print timers Ingo Molnar
2006-12-18 23:31     ` Andrew Morton
2006-12-18 23:45       ` Dave Jones
2006-12-19  0:00         ` Andrew Morton
2006-12-19 12:01           ` Ingo Molnar
2006-12-16 12:37 ` (Cross) compiling fails on first try (was Re: 2.6.20-rc1-mm1) Jan Dittmer
2006-12-16 13:56 ` [-mm patch] drivers/ide/pci/tc86c001.c: make a function static Adrian Bunk
2006-12-16 14:18   ` Alan
2006-12-17 18:08   ` Sergei Shtylyov
2006-12-17 20:52   ` Sergei Shtylyov
2006-12-16 13:56 ` [-mm patch] make uio_irq_handler() static Adrian Bunk
2006-12-20  6:09   ` Greg KH
2006-12-16 13:56 ` [-mm patch] drivers/video/{s3fb,svgalib}.c: possible cleanups Adrian Bunk
2006-12-16 17:39   ` Randy Dunlap
2006-12-16 18:16   ` Ondrej Zajicek
2006-12-16 13:57 ` [-mm patch] mm/vmscan.c: make a function static Adrian Bunk
2006-12-16 19:30 ` [-mm patch] noinitramfs cleanup Frederik Deweerdt
2006-12-18 13:38 ` [-mm patch] kill pxa2xx Kconfig warning Frederik Deweerdt
2006-12-18 20:06 ` 2.6.20-rc1-mm1 Bartlomiej Zolnierkiewicz
2006-12-19  0:29 ` 2.6.20-rc1-mm1 Randy Dunlap
2006-12-19  0:42   ` 2.6.20-rc1-mm1 Andrew Morton
2006-12-21 18:35 ` [-mm patch] ptrace: make {put,get}reg work again for gs and fs Frederik Deweerdt
2006-12-21 19:22   ` Jeremy Fitzhardinge
2006-12-21 20:53     ` Frederik Deweerdt
2006-12-21 21:59     ` Frederik Deweerdt
2006-12-22  2:00       ` Jeremy Fitzhardinge
     [not found]         ` <20061221181108.6cede9ba.akpm@osdl.org>
2006-12-22  6:06           ` Frederik Deweerdt
     [not found]             ` <20061221225414.de09c7df.akpm@osdl.org>
2006-12-22  7:00               ` Jeremy Fitzhardinge
2006-12-22  8:05               ` Frederik Deweerdt
2006-12-22  6:52           ` Jeremy Fitzhardinge
2006-12-22  6:55       ` Jeremy Fitzhardinge

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=20061219195650.GA8797@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tilman@imap.cc \
    /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.