From owner-freebsd-alpha Wed Jun 13 10:48:43 2001 Delivered-To: freebsd-alpha@freebsd.org Received: from beppo.feral.com (beppo.feral.com [192.67.166.79]) by hub.freebsd.org (Postfix) with ESMTP id E0C3137B405; Wed, 13 Jun 2001 10:48:37 -0700 (PDT) (envelope-from mjacob@feral.com) Received: from beppo (mjacob@beppo [192.67.166.79]) by beppo.feral.com (8.11.3/8.11.3) with ESMTP id f5DHmbg41037; Wed, 13 Jun 2001 10:48:37 -0700 (PDT) (envelope-from mjacob@feral.com) Date: Wed, 13 Jun 2001 10:48:33 -0700 (PDT) From: Matthew Jacob Reply-To: mjacob@feral.com To: John Baldwin Cc: Andrew Gallatin , wilko@FreeBSD.org, freebsd-alpha@FreeBSD.org Subject: Re: followup on 8 way SMP pani In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org > > > 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. Well, right. There are a number of possible sources for this on each platform. But it can't possibly be correct to assume that N different interval timer interrupts are anywhere within an aeon of each other. I can't believe that allowing clock interrupts on all cpus can be considered correct. Even if there is only one interrupt source (i.e., one hirez clock) there are quantization errors that would always make time different if maintained differently in each CPU. I think it's true that *system* time should only be adjusted by one CPU. But if you don't have a safe mechanism for getting nanotime offsets to system that is guaranteed to be monotonically increasing in hardware, you can always fall back to to the 'add one nanosecond under a lock' mechanism, right? I'm still trying to get it to work period for turbolaser. I think I tracked down the panic and can move ahead I believe. This other issue has to really be slightly orthogonal. -matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message