Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Jun 2001 10:38:23 -0700 (PDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Matthew Jacob <mjacob@feral.com>
Cc:        Andrew Gallatin <gallatin@cs.duke.edu>, wilko@FreeBSD.org, freebsd-alpha@FreeBSD.org
Subject:   Re: followup on 8 way SMP pani
Message-ID:  <XFMail.010613103823.jhb@FreeBSD.org>
In-Reply-To: <Pine.BSF.4.21.0106131003400.40934-100000@beppo.feral.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On 13-Jun-01 Matthew Jacob wrote:
> 
> On Wed, 13 Jun 2001, John Baldwin wrote:
> 
>> 
>> On 13-Jun-01 Matthew Jacob wrote:
>> > 
>> > 
>> > What I needed to fix for turbolaser is to clear the timer interrupt for
>> > all
>> > CPUs but the primary CPU- this is the TLINTRMASK{0,1} registers. But,
>> > stupid
>> > me, I upgraded my source first.
>> 
>> Ok, then we will need to change how platform.clockintr works slightly.  (It
>> will need to do more) and then forward_*clock in sys/i386/i386/mp_machdep.c
>> will need to be moved to sys/kern/subr_smp.c, and a few tweaks need to made
>> to
>> smp_handle_ipis() in alpha/alpha/mp_machdep.c, and the tlsb will need a
>> custom
>> platform.clockintr that handles clock interrupts the way x86 does by IPI'ing
>> all other processses to go handle clock interrupts.   Hmmm.  Actually.
> 
> Now I'm confused. I guess I should go look at the code. Are you saying you
> would like all CPUs to receive clock interrupts?

Yes.

> It was my belief/speculation that we ran into problems because all CPUs were
> getting a clock interrupt. Maybe that's not right?

No.  We only adjust the timecounters on the primary CPU's clock interrupt, so
that isn't a problem.  The problem that Doug pointed out with nanotime(9) is
that if two different CPU's try to read the time at the same time, they need to
get the same value.  This is not guaranteed if we use the pcc.  This can become
more problematic if a process migrates from one CPU to another and as a result
time "goes backwards" per se.  What we need is a global timer.  On an SMP
system, we can't use the CPU cycle counter for this.

-- 

John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-alpha" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.010613103823.jhb>