From owner-freebsd-amd64@FreeBSD.ORG Tue Aug 1 01:20:16 2006 Return-Path: X-Original-To: freebsd-amd64@hub.freebsd.org Delivered-To: freebsd-amd64@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8582716A4E1 for ; Tue, 1 Aug 2006 01:20:16 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5943543D55 for ; Tue, 1 Aug 2006 01:20:15 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k711KFh9032106 for ; Tue, 1 Aug 2006 01:20:15 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k711KE8T032105; Tue, 1 Aug 2006 01:20:14 GMT (envelope-from gnats) Resent-Date: Tue, 1 Aug 2006 01:20:14 GMT Resent-Message-Id: <200608010120.k711KE8T032105@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-amd64@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Evgeny Larionov Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C9F1616A4DA for ; Tue, 1 Aug 2006 01:16:05 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8C14443D45 for ; Tue, 1 Aug 2006 01:16:05 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k711G5fj033400 for ; Tue, 1 Aug 2006 01:16:05 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id k711G5QU033399; Tue, 1 Aug 2006 01:16:05 GMT (envelope-from nobody) Message-Id: <200608010116.k711G5QU033399@www.freebsd.org> Date: Tue, 1 Aug 2006 01:16:05 GMT From: Evgeny Larionov To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: amd64/101132: Incorrect cpu idle and usage statistics in top and systat programs in SMP 6.1-STABLE/amd64 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2006 01:20:16 -0000 >Number: 101132 >Category: amd64 >Synopsis: Incorrect cpu idle and usage statistics in top and systat programs in SMP 6.1-STABLE/amd64 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-amd64 >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Aug 01 01:20:14 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Evgeny Larionov >Release: 6.1-STABLE >Organization: Comlink >Environment: FreeBSD test.comlink.khakassia.ru 6.1-STABLE FreeBSD 6.1-STABLE #1: Sat Jul 29 19:18:29 KRAST 2006 lion@test.comlink.khakassia.ru:/usr/obj/usr/src/sys/HOSTING amd64 >Description: systat -v and top show incorrect information in SMP 6.1-STABLE under amd64. When run two program with 100% cpu alocation (using only calculation without idle) on processor with HTT (2 logical processors) top and systat show only not more 50% cpu usage with 50% idle. top: last pid: 52141; load averages: 1.92, 0.95, 0.40 up 2+14:13:23 09:00:47 71 processes: 3 running, 68 sleeping CPU states: 46.4% user, 0.0% nice, 0.0% system, 3.6% interrupt, 50.0% idle Mem: 101M Active, 205M Inact, 106M Wired, 15M Cache, 59M Buf, 2796K Free Swap: 1500M Total, 204K Used, 1500M Free PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND 52122 root 1 113 0 2412K 644K RUN 0 1:47 49.07% horse 52124 root 1 112 0 2412K 644K RUN 0 1:34 48.88% horse systat -v: 0.1%Sys 0.0%Intr 49.9%User 0.0%Nice 50.0%Idl 210568 inact 1 19: uhc | | | | | | | | | | 15856 cache 1 27: em0 >How-To-Repeat: show top or systat -v utilities in FreeBSD 6.1-STABLE amd64 with SMP kernel during high cpu load (two or more runnig programms using only calculation without idle, looped C code for example) and you can see always 50% CPU usage, not more. >Fix: >Release-Note: >Audit-Trail: >Unformatted: >>>>>>>>>>>>>>>>>>>>>>>>> 2576 free 3 48: twa daefr 2000 cpu0: time Namei Name-cache Dir-cache prcfr 2000 cpu1: time Calls hits % hits % react dmesg.boot: Copyright (c) 1992-2006 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 6.1-STABLE #1: Sat Jul 29 19:18:29 KRAST 2006 lion@test.comlink.khakassia.ru:/usr/obj/usr/src/sys/HOSTING Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel(R) Pentium(R) 4 CPU 3.00GHz (2992.52-MHz K8-class CPU) Origin = "GenuineIntel" Id = 0xf41 Stepping = 1 Features=0xbfebfbff Features2=0x641d> AMD Features=0x20000800 Logical CPUs per core: 2 real memory = 528371712 (503 MB) avail memory = 502108160 (478 MB) ACPI APIC Table: FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 1 ioapic0 irqs 0-23 on motherboard ioapic1 irqs 24-47 on motherboard ioapic2 irqs 48-71 on motherboard