From owner-freebsd-current@FreeBSD.ORG Tue Oct 7 04:30:43 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89048106568E for ; Tue, 7 Oct 2008 04:30:43 +0000 (UTC) (envelope-from joseph.koshy@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.153]) by mx1.freebsd.org (Postfix) with ESMTP id 1BB0E8FC1D for ; Tue, 7 Oct 2008 04:30:42 +0000 (UTC) (envelope-from joseph.koshy@gmail.com) Received: by fg-out-1718.google.com with SMTP id l26so2089458fgb.35 for ; Mon, 06 Oct 2008 21:30:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=oYra5GwS8zWlZ+bfOs7rWA49hAl2nScwWPhITG0e4fM=; b=ZS4V/oRcextInXHDXmtD73FfjaYIz1WJUPjkhJCQxPsENMdVcRcBZqcS62AEtjM5UU FCdP34OcPKQDXfx/WqpeIUtRMGbT0H4IeVcrXg3cvBr3ZjEtco+eehHkpa2IiZpK1NC8 kH8bNaxUcIIZjNZP9LrtCjIbu6t/uSkd3TDP0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=Rpb1iH1CG+nwk2mpvUB2+kvWKOigpvNoZygvQ+GTnxGxuAfAP0ETUAKZj3FiqHUMkF RbHmCPC6WvTqfb9gZvI3eeLFXEOC72uW3S11ZHkXjjelaovxSeJhYpgj2Vvqk5/2a5F0 8eGMK7b+Co0EVStLA0u3kt9Ge8aF/kP+gwKuw= Received: by 10.86.79.19 with SMTP id c19mr5284507fgb.79.1223352147587; Mon, 06 Oct 2008 21:02:27 -0700 (PDT) Received: by 10.86.63.15 with HTTP; Mon, 6 Oct 2008 21:02:27 -0700 (PDT) Message-ID: <84dead720810062102r2baf0e32y10594d3f1d07120d@mail.gmail.com> Date: Tue, 7 Oct 2008 09:32:27 +0530 From: "Joseph Koshy" To: "Ryan Stone" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Cc: freebsd-current@freebsd.org Subject: Re: pmcstat: should it fail when a cpu is disabled? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Oct 2008 04:30:43 -0000 > Recently I've run into a small issue where pmcstat will fail if a cpu > is disabled unless you specifically tell pmcstat to not attach to that > processor. This is annoying for me because we have some machines with > hyper-threaded cpus but we disable hyperthreading on them. When we > try to run pmcstat on those machines, pmcstat will try to attach to > the disabled hyperthreaded cpu and fail. I can work around it by > figuring out what the active cpus are and specifying only those cpus > to the -c options, but that's annoying. I was thinking that if the -c > '*' option is specified(either explicitly or implicitly by not > specifying any -c option) that pmcstat should only attach to active > cpus and ignore disabled cpus. I have a patch that will do this but I > wanted to gauge opinions on whether this behaviour is wanted or not > before submitting it. Any strong opinions one way or the other? In -current and 7.X, pmcstat(8) checks sysctl "machdep.hlt_cpus" and should not by default attempt to allocate PMCs on halted CPUs. Which version of FreeBSD are you running? Koshy