From owner-freebsd-current@FreeBSD.ORG Tue Aug 31 08:48:39 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D72CC10656CF; Tue, 31 Aug 2010 08:48:39 +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 3B8D78FC29; Tue, 31 Aug 2010 08:48:38 +0000 (UTC) Received: by fxm4 with SMTP id 4so4395614fxm.13 for ; Tue, 31 Aug 2010 01:48:38 -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=QK7We8UalLRz0rzBros5GAIiv0KmmnzAYulU7IkpONc=; b=uiN76XD+LDJChHuWmm3I1hmvetc1TLaWhwyQWvXH/NyG7iK3CnFmj2K4rtXWNI41fk NpUE0p4RCu+N5jScspbr0CWT018J0JWN7DpIabWsbuXerGcUuV0TF8wuFSo2MnW6h7dI Mi2gogUd+zrsGV+zL4q14givpTsAc7E816vGU= 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=nurylkafpMnZPLcmIPVz/EQEI04HREVDolvChzOp/EiCZ/M+eDzs4li/0BUjwSub/g Agx3LNjhCrR703k0FliekVN+5Lh+kUSqM6fPzaPf4dNXTkIgE9op61sZ3NuQDyItrgFk IGYfWitfy27FxHImZO44os9DyQ4Mq8TxKXVUs= Received: by 10.223.108.71 with SMTP id e7mr5033273fap.13.1283244518064; Tue, 31 Aug 2010 01:48:38 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id 14sm3838419fav.26.2010.08.31.01.48.36 (version=SSLv3 cipher=RC4-MD5); Tue, 31 Aug 2010 01:48:37 -0700 (PDT) Sender: Alexander Motin Message-ID: <4C7CC1DE.1080907@FreeBSD.org> Date: Tue, 31 Aug 2010 11:48:30 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: gljennjohn@googlemail.com References: <4C7A5C28.1090904@FreeBSD.org> <20100830110932.23425932@ernst.jennejohn.org> <4C7B82EA.2040104@FreeBSD.org> <20100830121148.11926306@ernst.jennejohn.org> <20100831102918.4f5404cc@ernst.jennejohn.org> In-Reply-To: <20100831102918.4f5404cc@ernst.jennejohn.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, FreeBSD-Current Subject: Re: One-shot-oriented event timers management X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2010 08:48:40 -0000 Gary Jennejohn wrote: > On Mon, 30 Aug 2010 12:11:48 +0200 > Gary Jennejohn wrote: > >> On Mon, 30 Aug 2010 13:07:38 +0300 >> Alexander Motin wrote: >> >>> Gary Jennejohn wrote: >>>> Hmm. I applied your patches and am now running the new kernel. But I >>>> only installed the new kernel and didn't do make buildworld installworld. >>>> >>>> Mu systat -vm 1 doesn't look anything like yours. I'm seeing about 2300 >>>> interrupts per second and most of those are coming from the hpet timers: >>>> >>>> 1122 hpet0:t0 >>>> 1124 hpet0:t1 >>> It means 1000Hz of hardclock (hz) events mixed with 127Hz of statclock >>> (stathz) events. HPET timer here works in one-shot mode handling it. >>> >>>> So, what else did you do to reduce interrupts so much? >>>> >>>> Ah, I think I see it now. My desktop has only C1 enabled. Is that it? >>>> Unfortunately, it appears that only C1 is supported :( >>> Yes, as I have said, at this moment empty ticks skipped only while CPU >>> is in C2/C3 states. In C1 state there is no way to handle lost events on >>> wake up. While it may be not very dangerous, it is not very good. >>> >> Too bad. I'd say that systems which are limited to C1 don't benefit >> much (or not at all) from your changes. >> > > OK, this is purely anecdotal, but I'll report it anyway. > > I was running pretty much all day with the patched kernel and things > seemed to be working quite well. > > Then, after about 7 hours, everything just stopped. > > I had gkrellm running and noticed that it updated only when I moved the > mouse. > > This behavior leads me to suspect that the timer interrupts had stopped > working and the mouse interrupts were causing processes to get scheduled. > > Unfortunately, I wasn't able to get a dump and had to hit reset to > recover. > > As I wrote above, this is only anecdotal, but I've never seen anything > like this before applying the patches. One-shot timers have one weak side: if for some reason timer interrupt getting lost -- there will be nobody to reload the timer. Such cases probably will require special attention. Same funny situation with mouse-driven scheduler happens also if LAPIC timer dies when pre-Core-iX CPU goes to C3 state. -- Alexander Motin