From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 1 12:15:45 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6043106564A; Wed, 1 Sep 2010 12:15:45 +0000 (UTC) (envelope-from gljennjohn@googlemail.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 BB31F8FC22; Wed, 1 Sep 2010 12:15:44 +0000 (UTC) Received: by fxm4 with SMTP id 4so5405503fxm.13 for ; Wed, 01 Sep 2010 05:15:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:in-reply-to:references:reply-to:x-mailer:mime-version :content-type:content-transfer-encoding; bh=lfNqMsAo40SVSzz2+Nh31Ie6CFtfDWtSeUz7XZbNKso=; b=luI7u4UNFzkDytBWIc1tTAQ5dRzqXC+sR15vACBF4l6fPELkbs9hPlsV4AOr3+BAgo gSHtavwWzd/wgP2FNa+SK7mWot/5CQGnFjtVdIrSIdPlgHYnnsCOEKKhU3ailk1F+HmB b2KO5fubnqccl6C8P+LC+ml6am3WMA73i7HO4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:reply-to :x-mailer:mime-version:content-type:content-transfer-encoding; b=X8APA6yQxCKAuYaBgi6hv7W/VVM/O1XB9Ar8iOMbe6QfRR94asgHggu0YulhfkHCri 5AKRfGExzh80gAmgEQo5ZSCslqjoawTduYw9VQhFORQiaOt//VboKgzEv8tUKWT+Vu8O S+1pLNO5Y/8e4wsYFYYZb0YXPwGUFe5AJLqmw= Received: by 10.223.118.211 with SMTP id w19mr6805278faq.19.1283343343860; Wed, 01 Sep 2010 05:15:43 -0700 (PDT) Received: from ernst.jennejohn.org (p578E1567.dip.t-dialin.net [87.142.21.103]) by mx.google.com with ESMTPS id 2sm4536681faz.38.2010.09.01.05.15.42 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 01 Sep 2010 05:15:43 -0700 (PDT) Date: Wed, 1 Sep 2010 14:15:41 +0200 From: Gary Jennejohn To: Alexander Motin Message-ID: <20100901141541.3e36c868@ernst.jennejohn.org> In-Reply-To: <4C7E2E8A.3030709@FreeBSD.org> References: <4C7A5C28.1090904@FreeBSD.org> <20100830110932.23425932@ernst.jennejohn.org> <4C7B82EA.2040104@FreeBSD.org> <20100830121148.11926306@ernst.jennejohn.org> <20100831102918.4f5404cc@ernst.jennejohn.org> <4C7CC1DE.1080907@FreeBSD.org> <4C7E2E8A.3030709@FreeBSD.org> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.18.7; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, FreeBSD-Current Subject: Re: One-shot-oriented event timers management X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gljennjohn@googlemail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2010 12:15:46 -0000 On Wed, 01 Sep 2010 13:44:26 +0300 Alexander Motin wrote: > Alexander Motin wrote: > > Gary Jennejohn wrote: > >> On Mon, 30 Aug 2010 12:11:48 +0200 > >> 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. > > I have reproduced the problem locally. It happens more often when ticks > are not stopped on idle, like in your original case (or if explicitly > enabled by kern.eventtimer.idletick sysctl). > > I've made some changes to HPET driver, which, I hope, should fix > interrupt losses there. > > Updated patch: http://people.freebsd.org/~mav/timers_oneshot6.patch > > Patch also includes some optimizations to reduce lock contention. > > Thanks for testing. > OK, I'll give it a try, althought your previous patch seems to be working quite well. BTW I've also been using tm6292_idle.patch. Do I really need it? -- Gary Jennejohn