From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 30 07:53:16 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 23ADB1065696; Mon, 30 Aug 2010 07:53:16 +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 7AD818FC12; Mon, 30 Aug 2010 07:53:14 +0000 (UTC) Received: by fxm4 with SMTP id 4so3542441fxm.13 for ; Mon, 30 Aug 2010 00:53:14 -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=RoKt67ftKkZ8vAyfU5NbY9HGWotdbpFdnplfCuRSNI8=; b=fkorUifU544qNb8VJHPVApUTMg6WJBnFtmHvwEVHz+Lmdg9oMD6awY4rRWwZrwM2me i/Rkd+v7bIC1Fn2qkZE7NQO+QcAT6HgEJ3tbdm2iBeNhtoy5iOYDFCHie+XOYmkzJg0d qCC9Nt/4OHfsFd9xjDWdu+JukWtDn259u9OZk= 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=CntQuII6te25DKZdBecIp0AYtKXYQlM63LyVoRrvhF5KSHS3VZLJWdS3u74IHEoIWI grS7C6t7B8NKiLo0Z8M9am/v7i9TajxXLFbnCy7aI8P356IHVVFzzn5K8ZtmlfrIobI2 hWVdsKQtSQHEnrH1UvHQHpq6/c/y+FQ5int30= Received: by 10.223.123.145 with SMTP id p17mr3279705far.90.1283154793949; Mon, 30 Aug 2010 00:53:13 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id r4sm3182600faa.19.2010.08.30.00.53.12 (version=SSLv3 cipher=RC4-MD5); Mon, 30 Aug 2010 00:53:13 -0700 (PDT) Sender: Alexander Motin Message-ID: <4C7B6364.8090908@FreeBSD.org> Date: Mon, 30 Aug 2010 10:53:08 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: Brandon Gooch References: <4C7A5C28.1090904@FreeBSD.org> In-Reply-To: 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-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2010 07:53:16 -0000 Brandon Gooch wrote: > One thing I see: > > Where is *frame pointing to? It isn't initialized in the function, so... Thanks! Fixed. Patch updated. > Also, for those of us testing, should we "reset" our timer settings > back to defaults and work from there[1] (meaning, should we be futzing > around with timer event sources, kern.hz, etc...)? The general logic is still applicable. Reducing HZ is less important now, but lower value allows system slightly aggregate close events by the cost of precision. Unluckily we have no better mechanism to do it now. What's about event source - there is only one timer supported now and sysctl/tunable name changed to kern.eventtimer.timer, so previous options just won't work. Also with support for one-shot mode, use of RTC and i8254 timers is not recommended any more - they do not support it. Use LAPIC or HPET. If you have Core-iX class CPU - you may use any of them, they are very close in functionality. If you use Core2 or earlier - prefer HPET, as LAPIC is dying in C3 state. If you use HPET on Core2-class CPU (actually on ICHX class south bridges, which do not support MSI-like interrupts for HPET) - you may like to set such tunables: hint.atrtc.0.clock=0 hint.attimer.0.clock=0 hint.hpet.0.legacy_route=1 It will disable RTC and i8254 timers, but grant their interrupts to HPET, allowing it to work as per-CPU for dual-CPU systems. -- Alexander Motin