From owner-cvs-all@FreeBSD.ORG Tue Sep 5 17:15:35 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7C34816A4DF; Tue, 5 Sep 2006 17:15:35 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id CB87943D5F; Tue, 5 Sep 2006 17:15:26 +0000 (GMT) (envelope-from sobomax@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k85HFQuG078970; Tue, 5 Sep 2006 17:15:26 GMT (envelope-from sobomax@repoman.freebsd.org) Received: (from sobomax@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k85HFPtF078969; Tue, 5 Sep 2006 17:15:25 GMT (envelope-from sobomax) Message-Id: <200609051715.k85HFPtF078969@repoman.freebsd.org> From: Maxim Sobolev Date: Tue, 5 Sep 2006 17:15:25 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/i386/i386 local_apic.c src/sys/amd64/amd64 local_apic.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Sep 2006 17:15:35 -0000 sobomax 2006-09-05 17:15:25 UTC FreeBSD src repository Modified files: sys/i386/i386 local_apic.c sys/amd64/amd64 local_apic.c Log: The FreeBSD by default "disables" hyper-threading cores, by not scheduling any threads to them. However, it still counts those cores as "active but permanently idle" when calculating system-wide CPUs statistics. It is incorrect, since it skews statistics quite a bit and creates real problems for certain types of applications (monitoring applications for example), by making them believe that the system does have enough idle CPU resources, while in fact it does not. Correct the problem by not calling performance counting routines on "disabled" cores. The cleaner solution would be to just disable APIC timer interrupts on those cores completely, but ENOTIME here and it is not clear if the additional complexity really worth minor performance gain. Reviewed by: ssouhlal Sponsored by: Sippy Software, Inc. MFC after: 2 weeks Revision Changes Path 1.27 +10 -0 src/sys/amd64/amd64/local_apic.c 1.29 +10 -0 src/sys/i386/i386/local_apic.c