From owner-freebsd-arch@FreeBSD.ORG Thu Mar 20 05:41:32 2008 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E6A581065672 for ; Thu, 20 Mar 2008 05:41:32 +0000 (UTC) (envelope-from joseph.koshy@gmail.com) Received: from rv-out-0910.google.com (rv-out-0910.google.com [209.85.198.186]) by mx1.freebsd.org (Postfix) with ESMTP id B18388FC25 for ; Thu, 20 Mar 2008 05:41:32 +0000 (UTC) (envelope-from joseph.koshy@gmail.com) Received: by rv-out-0910.google.com with SMTP id g13so472678rvb.43 for ; Wed, 19 Mar 2008 22:41:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; 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=8Mb7ZGnUoEtD6fufNouRpNAn8d+2hskPHvv/0OFzFcY=; b=Q8PQR7L0cvvGZ8nIIQEqKxF/Mr2KM0uJxrMZLQPmizsUsisjewPFnDaeITD/jxdLXUNMi9npcfxU+bp8+TtCM2C6JxdfCrSSqlLunCegRVvZA5bhw95lmRe+zrILU3u6nz0O9Cn+pa2XB1QACFdm59SFpnFBpmofve0NOfIhDRU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=eCKdJ9C+zv5KNQGYkXMz5BBJG2Mf3+nx9SF5LfXsIXtCC+mQTBqwwYAsJrNyNhN5TvW8NNqGWrUVVVqpuliHDjFvoe/RTCl3AIxY8vqsGRKu0IiRucfuXiLwhXll6Ltz3AZkr3x84Z6x3o3k7cF0726cP+GEw4UdLbl57GDbPG8= Received: by 10.141.20.7 with SMTP id x7mr565398rvi.255.1205991692113; Wed, 19 Mar 2008 22:41:32 -0700 (PDT) Received: by 10.141.85.7 with HTTP; Wed, 19 Mar 2008 22:41:32 -0700 (PDT) Message-ID: <84dead720803192241x1b8ee4c5y65cea8dcca79530f@mail.gmail.com> Date: Thu, 20 Mar 2008 11:11:32 +0530 From: "Joseph Koshy" To: "John Baldwin" In-Reply-To: <200803170947.25205.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080313180805.GA83406@dragon.NUXI.org> <200803141431.53846.jhb@freebsd.org> <84dead720803142243r6c8cc68dm325e7fb925189fd@mail.gmail.com> <200803170947.25205.jhb@freebsd.org> Cc: freebsd-arch@freebsd.org Subject: Re: [PATCH] hwpmc(4) changes to use 'mp_maxid' instead of 'mp_ncpus'. X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Mar 2008 05:41:33 -0000 jk> HWPMC is very x86 centric, for obvious reasons. jhb> Considering other CPU archictectures support various performance counters it jhb> really shouldn't be designed to be x86-centric even if it is currently only jhb> implemented for x86 CPUs. Of course. It isn't DESIGNED as x86-centric---I surveyed a number of non-x86 PMC implementations when designing the MI/MD interface inside of hwpmc(4) and when designing the end-user programming model. The "obviousness" of HWPMC's current x86-centricity arises from the fact that only x86 systems are affordable (or available even) for a hobbyist in my part of the world. > Userland cycles are "cheaper". :) Not so, they cost the same as kernel cycles in the final analysis :). > I think having both is fine and userland can choose which to use > (maxcpus is probably easier to impl but perhaps less efficient). Ok. jk> Looking around, there appear to be lots of nits that need correction. jk> For one, the kern.smp sysctl hierarchy is undocumented. jhb> Not entirely: jhb> sysctl -d kern.smp jhb> kern.smp: Kernel SMP jhb> kern.smp.maxcpus: Max number of CPUs that the system was compiled for. I stand (partially) corrected :). Koshy