From owner-freebsd-sparc64@FreeBSD.ORG Wed Jul 28 07:09:22 2010 Return-Path: Delivered-To: freebsd-sparc64@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0439F106566B; Wed, 28 Jul 2010 07:09:22 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id 2D8D98FC15; Wed, 28 Jul 2010 07:09:20 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.3/8.14.3/ALCHEMY.FRANKEN.DE) with ESMTP id o6S79JPM004583; Wed, 28 Jul 2010 09:09:19 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.3/8.14.3/Submit) id o6S79JPa004582; Wed, 28 Jul 2010 09:09:19 +0200 (CEST) (envelope-from marius) Date: Wed, 28 Jul 2010 09:09:19 +0200 From: Marius Strobl To: Alexander Motin Message-ID: <20100728070919.GB75632@alchemy.franken.de> References: <4C404018.6040405@FreeBSD.org> <20100716213503.GT4706@alchemy.franken.de> <4C42A5B9.7080901@FreeBSD.org> <20100718142101.GY4706@alchemy.franken.de> <4C433391.4080808@FreeBSD.org> <20100719122423.GA4706@alchemy.franken.de> <4C44694C.9040108@FreeBSD.org> <4C46E3BB.7060204@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4C46E3BB.7060204@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-sparc64@FreeBSD.org Subject: Re: [RFC] Event timers on sparc64/sun4v X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jul 2010 07:09:22 -0000 On Wed, Jul 21, 2010 at 03:10:35PM +0300, Alexander Motin wrote: > Alexander Motin wrote: > > Marius Strobl wrote: > >> On Sun, Jul 18, 2010 at 08:02:09PM +0300, Alexander Motin wrote: > >>> tick_et_start() status is not checked my MI code at the moment, as error > >>> handling in that case is not obvious. Do you like panic of printf there? > >> Ah, I haven't looked at the MI code to closely. No, it's not that > >> important, a printf should be sufficient for now, I just don't > >> want the check to get completely dropped. > > > > I better do it MI way. It's not so difficult. I am just thinking what > > better report from driver: allowed divisors, periods, or rounding function. > > Here is updated patch for latest HEAD, which should handle this: > http://people.freebsd.org/~mav/timers_sparc4.patch > > I also added support for STICK timecounter. For this moment with lowest > priority to not use it by default, until it is tested. > The patch looks ok and seems to work as expected on MP US-IIIi. However, I'd suggest to just use TICK_QUALITY_{M,U}P for the quality of the STICK timecounter but negated for now; I see no reason why the STICK timecounter should be of any other quality (from the hardware point of view) than the TICK one and whatever the solution is to make the TICK timecounter work with locks etc also needs to be applied to the STICK one (maybe on some machines the synchronicity across CPUs actually happens to be sufficient but I'd like to rather not make any assumptions about machines that f.e. group CPUs by coherency domain etc). A difference in behavior I noticed is that the TICK interrupt rate now is 2kHz (with HZ 1000). Why is that (I think that on x86 the timers ran at 2*HZ before though)? Marius