Re: Freebsd 6.0 doesnt detect local APIC on a Pentium 3 machine

From: John Baldwin <jhb_at_freebsd.org>
Date: Tue, 8 Nov 2005 10:18:51 -0500
On Monday 07 November 2005 08:38 pm, Vaibhave Agarwal wrote:
> On Mon, 7 Nov 2005, John Baldwin wrote:
> > And even then it can't be used for any device interrupts since there
> > aren't any I/O APICs.  On a UP machine without I/O APICs, it's actually
> > probably more optimal to just use irq0 and irq8 for clocks rather than
> > the lapic timer anyway.  The only real possible gain is the ability to
> > use the profiling interrupt from the local APIC.
>
> I got access to the BIOS of the Pentium 3 machine I am using, but it has
> no option to enable/disable the local APIC.

Yes, I've not seen any BIOSen that do.

> Joseph Koshy is right, Linux enables the local APIC timer while booting
> up. I got the following in the bootup log of Linux 2.4 kernel on the same
> machine.
>
> -------------------------
> Local APIC disabled by BIOS -- reenabling.
> Found and enabled local APIC!
>
> Using local APIC timer interrupts.
> calibrating APIC timer ...
> -------------------------

Just because Linux does for UP doesn't mean it is more optimal for FreeBSD. :)  
On FreeBSD with the lapic timer you have 2 * hz interrupts per second.  With 
the irq0/irq8 combo you have hz + stathz interrupts per second.  The 
difference is 2000 vs 1128.  Granted, the lapic timer interrupt handler 
doesn't have to talk to hardware out on the LPC bus..

> Though there is no I/O apic in the UP machines, but I only wanted to use
> local APIC timer in the lapic_timer_oneshot() mode to schedule few timers
> accurately.

You can increase the rate of the rtc timer.  We run it at profhz (1024) when 
profiling is enabled for example.

-- 
John Baldwin <jhb_at_FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org
Received on Tue Nov 08 2005 - 15:11:09 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:47 UTC