From owner-p4-projects@FreeBSD.ORG Wed May 9 20:29:32 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9BBD616A40A; Wed, 9 May 2007 20:29:32 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6DD6716A403; Wed, 9 May 2007 20:29:32 +0000 (UTC) (envelope-from rpaulo@fnop.net) Received: from core.fnop.net (mx.fnop.net [82.102.11.82]) by mx1.freebsd.org (Postfix) with ESMTP id CF4A313C44B; Wed, 9 May 2007 20:29:31 +0000 (UTC) (envelope-from rpaulo@fnop.net) Received: from core.fnop.net (mx.fnop.net [82.102.11.82]) by core.fnop.net (Postfix) with ESMTP id 1BA1868FEBB; Wed, 9 May 2007 21:29:34 +0100 (WEST) Received: by core.fnop.net (Postfix, from userid 1015) id C5EDB690919; Wed, 9 May 2007 21:29:33 +0100 (WEST) X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on core.fnop.net X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=AWL, BAYES_00, FORGED_RCVD_HELO, RCVD_IN_NJABL_DUL,RCVD_IN_SORBS_DUL autolearn=no version=3.1.7 Received: from epsilon.local.fnop.net (87-196-156-100.net.novis.pt [87.196.156.100]) by core.fnop.net (Postfix) with ESMTP id 1E76B68FEBB; Wed, 9 May 2007 21:29:33 +0100 (WEST) Date: Wed, 09 May 2007 21:29:25 +0100 Message-ID: <86ejlpn3kq.wl%rpaulo@fnop.net> From: Rui Paulo To: John Baldwin In-Reply-To: <200705091543.33002.jhb@freebsd.org> References: <200705062110.l46LAZqE011583@repoman.freebsd.org> <200705091457.39167.jhb@freebsd.org> <3bbf2fe10705091233t405121d2qda9a058ecf4124bc@mail.gmail.com> <200705091543.33002.jhb@freebsd.org> User-Agent: Wanderlust/2.14.0 (Africa) Emacs/21.3 Mule/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: ClamAV using ClamSMTP Cc: Attilio Rao , Perforce Change Reviews , Rui Paulo Subject: Re: PERFORCE change 119371 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 May 2007 20:29:32 -0000 At Wed, 9 May 2007 15:43:32 -0400, John Baldwin wrote: > > On Wednesday 09 May 2007 03:33:11 pm Attilio Rao wrote: > > 2007/5/9, John Baldwin : > > > On Sunday 06 May 2007 05:10:35 pm Rui Paulo wrote: > > > > http://perforce.freebsd.org/chv.cgi?CH=119371 > > > > > > > > Change 119371 by rpaulo@rpaulo_epsilon on 2007/05/06 21:10:15 > > > > > > > > We don't need any scheduler support because: > > > > 1) msrtemp is a child of cpu - this implies that every > > > > rdmsr/cpuid instruction will be executed on that CPU. > > > > > > No, that isn't true. You do need to use sched_bind() for that so you are > > > really on the desired CPU when you read the MSR. > > > > I think he just needs msr of the cpu where curthread is executed, so > > any scheduler lock should be needed. > > If he needs to know msr of a particular CPU he really needs so, but it > > doesn't seem the case. > > The sysctl is per-CPU, so he needs the msr from a specific CPU in the sysctl > handler. I.e., it's like dev.cpu.0.temp or some such. Yes, I need the MSR from a specific CPU. Does sched_pin() solve the problem? Or do I need to use shed_bind()?