[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20061020135450.6794a2bb.akpm@osdl.org>
Date: Fri, 20 Oct 2006 13:54:50 -0700
From: Andrew Morton <akpm@...l.org>
To: Ingo Molnar <mingo@...e.hu>
Cc: tglx@...utronix.de, teunis <teunis@...tersgift.com>,
linux-kernel@...r.kernel.org, Dmitry Torokhov <dtor@...l.ru>
Subject: Re: various laptop nagles - any suggestions? (note:
2.6.19-rc2-mm1 but applies to multiple kernels)
On Fri, 20 Oct 2006 22:37:31 +0200
Ingo Molnar <mingo@...e.hu> wrote:
>
> * Andrew Morton <akpm@...l.org> wrote:
>
> > > > I don't know how many machines will be affected by this, but I'd
> > > > expect it's quite a few - the Vaio has a less-than-one-year-old
> > > > Intel CPU in it.
> > >
> > > Is this still the broken lapic issue ?
> >
> > yup. iirc the standard FC5 SMP kernel runs dog-slowly on that machine
> > too.
>
> hm. This is how lapic timer calibration works.
>
> the lapic timer is really simple - it counts down from a value and
> generates an irq if that counter reaches 0. Then it starts counting down
> again.
>
> the 'count down from' value is programmed via __setup_APIC_LVTT().
>
> we first write a 'really large' number into it (1 billion):
>
> __setup_APIC_LVTT(1000000000);
>
> the unit of counting is '16 system bus cycles'.
>
> i.e. if your system has a system bus of 333 MHz, then a value of 1
> billion takes 48 seconds to count down. (so the calibration ought to be
> pretty robust in this regard.)
>
> then we use the wait_timer_tick() function, which waits until the PIT
> counter reaches 0 (which is attached to the PIT whose frequency we know
> and thus the PIT is already programmed correctly). Hence by calling
> wait_timer_tick() we can generate a delay of one jiffy - and we can read
> out the current lapic timer count and determine the calibration factor.
>
> then we calculate the result as:
>
> result = (tt1-tt2)*APIC_DIVISOR/LOOPS;
>
> where tt1 is the counter before we start calibration, tt2 is the lapic
> timer counter after we did calibration. (APIC_DIVISOR is 16)
>
> i dont see where the error is - but there must be some calibration
> problem as your system shows a systematic 1:60 difference between
> expected and real lapic timer frequency.
>
Oh. I thought the problem was that the timer stops when the CPU is idle.
Maybe I misremembered. I'll try `idle=poll'.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists