From owner-freebsd-mips@FreeBSD.ORG Tue Jul 27 15:16:25 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B832106566B; Tue, 27 Jul 2010 15:16:25 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 62EE38FC1E; Tue, 27 Jul 2010 15:16:24 +0000 (UTC) Received: by fxm13 with SMTP id 13so699415fxm.13 for ; Tue, 27 Jul 2010 08:16:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=b+TzLLoLKmn80tdk1lPv+N3fcuO5qpAokbRD9D58zCc=; b=fjZDdQ9xy24ufTZoj4xkLv1qtUbuQvbO4Ii68uy7MgxUlP+wcAYrdIxhB9zw7lizZj z5lcIdFmx1WRiB0OxBhWiHSOQXQDdwTslYM0Y/FXfb4pZsSCLlwXLds/f7HBMf9cuH4h wlPUgzwx0KZbLvPknm+7BlBGJfOPgUUKArpTc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=NgEDDnDNmKpzWrAIN4Ly+j7OnW2b1Ac07nSMKKyQXxJ57cBGRFOY3ioLBNudXFIeKq LRfVfaX2uqcbKqLnGn/c/wB41iGbr0ENjEJBoPhH2AgFI9Am1Q6mlz1JShfW1uuNPYrE OvzinOL7jNkY0moeL1aCv4gdoaWxIoc70Zjck= Received: by 10.223.104.7 with SMTP id m7mr8282973fao.8.1280243783348; Tue, 27 Jul 2010 08:16:23 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id r8sm1967032faq.34.2010.07.27.08.16.21 (version=SSLv3 cipher=RC4-MD5); Tue, 27 Jul 2010 08:16:22 -0700 (PDT) Sender: Alexander Motin Message-ID: <4C4EF842.5020103@FreeBSD.org> Date: Tue, 27 Jul 2010 18:16:18 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.24 (X11/20100402) MIME-Version: 1.0 To: "Jayachandran C." References: <4C41A248.8090605@FreeBSD.org> <4C41B4CF.6080409@FreeBSD.org> <4C4205CC.6080700@FreeBSD.org> <4C4ED247.80701@FreeBSD.org> <4C4EF398.1050507@FreeBSD.org> In-Reply-To: <4C4EF398.1050507@FreeBSD.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Randall Stewart , Neel Natu , freebsd-mips@freebsd.org Subject: Re: [RFC] Event timers on MIPS X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2010 15:16:25 -0000 Alexander Motin wrote: > Jayachandran C. wrote: >> On Tue, Jul 27, 2010 at 6:04 PM, Alexander Motin wrote: >>> Jayachandran C. wrote: >>>> Also, with just the count/compare, I get these print on early mutiuser bootup. >>>> --- >>>> calcru: runtime went backwards from 85936878 usec to 236488 usec for >>>> pid 1286 (rpcbind) >>>> calcru: runtime went backwards from 7158742 usec to 19700 usec for pid >>>> 1285 (nfsiod 0) >>>> calcru: runtime went backwards from 111005442 usec to 305474 usec for >>>> pid 1257 (syslogd) >>>> calcru: runtime went backwards from 10740196 usec to 29555 usec for >>>> pid 1048 (devd) >>>> -- >>>> Did not get much time to investigate, any idea what the cause can be? >>> I think it can easily be result of broken tick_ticker(). >> I'm planning to check-in the attached patch for mips/rmi, I think >> mips/mips would need something similar. > > Looks fine. Does it help? Sorry, after looked again, I've got one question. Why this: + DPCPU_SET(counter_upper, t_upper); + DPCPU_SET(counter_lower_last, t_lower_last); was moved out of the critical section? Due to the per-CPU nature of this function it probably always called inside critical section, so there is no problem I think. But IMHO either critical section calls there are unneeded, or above sets and mips_rd_count() worth moving inside of it. -- Alexander Motin