From owner-freebsd-acpi@FreeBSD.ORG Tue Jan 11 07:51:05 2011 Return-Path: Delivered-To: acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63EAD106566B for ; Tue, 11 Jan 2011 07:51:05 +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 E27568FC14 for ; Tue, 11 Jan 2011 07:51:04 +0000 (UTC) Received: by fxm16 with SMTP id 16so19686571fxm.13 for ; Mon, 10 Jan 2011 23:51:03 -0800 (PST) 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=C5K6+THIFCpeir/GKjnyUCcLdqQxfWXW/bJSUvpH0xI=; b=AhSSx1bTIjylM4NUp59Rr4vIoEdezdYL95ZfwQ4PAukef0yVMKs77bpf9xoGDHJ+os ABeoLDKyysxcX5YPn5Qh3wL+H5RnLqxBhQoe+XwvD91b9h2b3xblL5VaGKlYwACpx3lB BVHo+HXjmBeE7LGV1L5uhLQ7gNN2LlueFjPwc= 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=qYb6Y1vOY2s6fFewbGuex7zwTgLgUO0n29/1LdjxJ6aEqtiheu5QvAa0wnlZwvyF44 1U14rDvgWURPPXKeJpEmxSTk8rsYBe+byiMooep1SpgfYZZgEsiUyHsp9Ptvd7+cGPLF PJC7mXR1CNbxVdA7HXxzgvgOiFZj6FDu1J4e4= Received: by 10.223.79.68 with SMTP id o4mr4243843fak.0.1294732263763; Mon, 10 Jan 2011 23:51:03 -0800 (PST) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id n26sm7256620fam.13.2011.01.10.23.51.01 (version=SSLv3 cipher=RC4-MD5); Mon, 10 Jan 2011 23:51:02 -0800 (PST) Sender: Alexander Motin Message-ID: <4D2C0BC7.4090103@FreeBSD.org> Date: Tue, 11 Jan 2011 09:50:31 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: Bruce Evans References: <201101101500.45783.jhb@freebsd.org> <4D2B67E4.70907@FreeBSD.org> <201101101515.47127.jhb@freebsd.org> <4D2B8944.6030200@FreeBSD.org> <20110111160606.H2006@besplex.bde.org> In-Reply-To: <20110111160606.H2006@besplex.bde.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: acpi@FreeBSD.org, "Arno J. Klaassen" Subject: Re: Tyan S3992-E: hpet no longer working X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jan 2011 07:51:05 -0000 Bruce Evans wrote: > On Tue, 11 Jan 2011, Alexander Motin wrote: > >> Arno J. Klaassen wrote: >>> Sure .. that said, the BIOS I use is the last official release for this >>> board (Sept 2009) and not even a more recent beta-release is available. >>> >>> I would expect reporting a disabled device which cannot be enabled via >>> de BIOS a bug deserving a newer release. >>> >>> Anyway, this bug isn't very harmful for me, but the non-hpet >>> timecounters don't seem that fun either : >>> >>> # uptime >>> 10:27PM up 2 days, 5:44 >>> >>> # sysctl kern.timecounter.hardware kern.timecounter.choice >>> kern.timecounter.hardware: ACPI-safe >>> kern.timecounter.choice: TSC(-100) i8254(0) ACPI-safe(850) >>> dummy(-1000000) >>> >>> # vmstat -i | fgrep cpu: >>> cpu0:timer 38599321 199 >>> cpu6:timer 2151003 11 >>> cpu1:timer 7121075 36 >>> cpu3:timer 1808269 9 >>> cpu5:timer 3832463 19 >>> cpu2:timer 2399988 12 >>> cpu7:timer 2013444 10 >>> cpu4:timer 21630368 111 >>> >>> (default HZ ....) >>> >>> Maybe I should try downgrading the BIOS? >> >> So what here seems not funny to you? Lower timer interrupt rate is not a >> bug but feature of 9-CURRENT. > > They (cpu*:timer) also aren't timecounters :-). Sure. They've never been timecounters. > Hmm, with hpet on FreeBSD cluster machines, there is now only hpet. How > is statclock distributed with hpet? If there are enough timers for each CPU and their IRQs are not shareable -- they are assigned to each CPU, one to one. The rest logic is same for all drivers: if timer is not per-CPU - it is used for all CPUs and events redistributed via IPI by MI code. Plus of one-shot mode - we don't need separate timer hardware for statclock. > I never properly reviewed the latest "irqN"-printing changes in systat, > and just noticed that they break printing of "irq" the usual case where > the interrupt name starts with "irqN:" (then systat removes "irqN:" and > never puts back "irq"). > > Not-so-quick fix: > > % Index: vmstat.c > % =================================================================== > % RCS file: /home/ncvs/src/usr.bin/systat/vmstat.c,v > % retrieving revision 1.93 > % diff -u -2 -r1.93 vmstat.c > % --- vmstat.c 11 Dec 2010 08:32:16 -0000 1.93 > % +++ vmstat.c 11 Jan 2011 06:20:01 -0000 > % @@ -244,5 +244,10 @@ > % *--cp1 = '\0'; > % % - /* Convert "irqN: name" to "name irqN". */ > % + /* > % + * Convert "irqN: name" to "name irqN", "name N" or > % + * "name". First reduce to "name"; then append > % + * " irqN" if that fits, else " N" if that fits, > % + * else drop all of "N". > % + */ > % if (strncmp(cp, "irq", 3) == 0) { > % cp1 = cp + 3; > % @@ -256,5 +261,8 @@ > % cp2 = strdup(cp); > % bcopy(cp1, cp, sz - (cp1 - cp) + 1); > % - if (sz <= 10 + 4) { > % + if (sz <= 10 + 1) { > % + strcat(cp, " "); > % + strcat(cp, cp2); > % + } else if (sz <= 10 + 4) { > % strcat(cp, " "); > % strcat(cp, cp2 + 3); > % @@ -266,5 +274,9 @@ > % /* > % * Convert "name irqN" to "name N" if the former is > % - * longer than the field width. > % + * longer than the field width. This handles some > % + * cases where the original name did not start with > % + * "irqN". We don't bother dropping partial "N"s in > % + * this case. The "name" part may be too long in > % + * either case; then we blindly truncate it. > % */ > % if ((cp1 = strstr(cp, "irq")) != NULL && > > This restores part of rev.1.90, updates the first comment to match the code > changes in rev.1.90, and expands the last comment. Heh. If I haven't forgot some prehistory, you may be right. -- Alexander Motin