public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Andreas Mohr <andi@rhlx01.fht-esslingen.de>
Cc: Ingo Molnar <mingo@elte.hu>, Len Brown <lenb@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: CONFIG_NO_HZ: missed ticks, stall (keyb IRQ required) [2.6.18-rc4-mm1]
Date: Tue, 07 Nov 2006 10:45:58 +0100	[thread overview]
Message-ID: <1162892758.4715.362.camel@localhost.localdomain> (raw)
In-Reply-To: <1162891737.4715.354.camel@localhost.localdomain>

On Tue, 2006-11-07 at 10:28 +0100, Thomas Gleixner wrote:
> > That's what I didn't understand all that time:
> > I do get the "C2 unusable, kills APIC timer" message, so I expected the code
> > to not use C2, but it seems it did use it (causing hangs) and I didn't
> > fully analyze the code whether it truly tried to prevent C2 here
> > (handling was a bit opaque to me, should have analyzed it
> > more thoroughly to get to know exactly what happens).
> > 
> > And like I said, brutally hard-wiring max_cstate to C1 already fixed
> > dynticks things for me, so it seems as if it still touched C2 before.
> 
> Yes, it leaves the C states untouched, it uses (should use) PIT instead
> of the local APIC timer. I'm a bit confused, why this does not work on
> your box.

Can you try the patch below please ? I just noticed, that the local APIC
gets reprogrammed before we switch back from PIT, which is perfectly
fine, but maybe your box does not like that treatment. If this does not
help, I'm going to do the never switch back from PIT hackery which I
wanted to avoid for performance reasons.

	tglx

Index: linux-2.6.19-rc4-mm1/arch/i386/kernel/apic.c
===================================================================
--- linux-2.6.19-rc4-mm1.orig/arch/i386/kernel/apic.c	2006-11-07 10:33:56.000000000 +0100
+++ linux-2.6.19-rc4-mm1/arch/i386/kernel/apic.c	2006-11-07 10:33:18.000000000 +0100
@@ -100,6 +100,7 @@ static struct clock_event_device lapic_c
  */
 struct lapic_event_device {
 	struct clock_event_device	evdev;
+	enum clock_event_mode		mode;
 	unsigned long			last_delta;
 	unsigned long			counter;
 };
@@ -224,9 +225,11 @@ static void lapic_next_event(unsigned lo
 	struct lapic_event_device *ldev;
 
 	ldev = container_of(evt, struct lapic_event_device, evdev);
-	ldev->last_delta = delta;
 
-	apic_write_around(APIC_TMICT, delta);
+	if (ldev->mode == CLOCK_EVT_PERIODIC) {
+		ldev->last_delta = delta;
+		apic_write_around(APIC_TMICT, delta);
+	}
 }
 
 /*
@@ -257,7 +260,7 @@ static void lapic_timer_setup(enum clock
 		apic_write_around(APIC_LVTT, v);
 		break;
 	}
-
+	ldev->mode = mode;
 	local_irq_restore(flags);
 }
 



  reply	other threads:[~2006-11-07  9:43 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-01 14:07 CONFIG_NO_HZ: missed ticks, stall (keyb IRQ required) [2.6.18-rc4-mm1] Andreas Mohr
2006-11-01 21:51 ` Thomas Gleixner
2006-11-02  0:18   ` Andreas Mohr
2006-11-02  7:31     ` Thomas Gleixner
2006-11-02  8:14       ` Thomas Gleixner
2006-11-02 17:22         ` Thomas Gleixner
2006-11-02 19:28           ` Andreas Mohr
2006-11-02 20:34             ` Andreas Mohr
2006-11-03  0:06               ` Andreas Mohr
2006-11-06 16:20                 ` Thomas Gleixner
2006-11-06 20:58                   ` Andreas Mohr
2006-11-07  6:41                     ` Len Brown
2006-11-07  8:07                       ` Ingo Molnar
2006-11-07  8:25                         ` Thomas Gleixner
2006-11-07  9:16                           ` Andreas Mohr
2006-11-07  9:28                             ` Thomas Gleixner
2006-11-07  9:45                               ` Thomas Gleixner [this message]
2006-11-07 22:27                                 ` Andreas Mohr
2006-11-08 19:36                                   ` Thomas Gleixner
2006-11-14  6:34                         ` Len Brown
2006-11-07  8:18                       ` Andreas Mohr
2006-11-07  8:24                         ` Ingo Molnar
2006-11-14  6:27                         ` Len Brown
  -- strict thread matches above, loose matches on Subject: below --
2006-11-14 17:21 Pallipadi, Venkatesh
2006-11-14 17:30 ` Andreas Mohr
2006-11-14 18:04   ` Andreas Mohr
2006-12-17 15:58 ` Tobias Diedrich
2006-11-14 18:06 Pallipadi, Venkatesh
2006-11-14 20:30 ` Andreas Mohr
2006-11-14 21:00   ` Andreas Mohr
2006-11-14 21:18     ` Andreas Mohr

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=1162892758.4715.362.camel@localhost.localdomain \
    --to=tglx@linutronix.de \
    --cc=andi@rhlx01.fht-esslingen.de \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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