From owner-p4-projects@FreeBSD.ORG Wed May 9 20:19:44 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 198B216A40A; Wed, 9 May 2007 20:19:44 +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 C7FE816A408 for ; Wed, 9 May 2007 20:19:43 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.233]) by mx1.freebsd.org (Postfix) with ESMTP id 6B22113C45B for ; Wed, 9 May 2007 20:19:43 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: by wr-out-0506.google.com with SMTP id 70so337272wra for ; Wed, 09 May 2007 13:19:42 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=MzIUs96iHYEHv74Z6CTj2BmnoSY25+ypSuo883DkXIx98QgFZZgqDNdKJ5HJCWAwF0T01covwX9Jtoma45WHOeT/ZmeVT9Nd7+n9KqatdFAx73uoscu5TZhVO+ybq1bfPxY4y3Xi0GWGLK6vx1E9QY827L6q86R5gcTca/fCVMg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=s0rqbcaKpsIyCy+GQY483VLB36jGDAjJdjfXjQyAIVw7JZ0L9/jPmpemGGOeRsYUnzAPbzIHwoch27uSMBArkw5Is5q6GiARzU7KZ+wwhmNfC6x/d3Hv3JY1YK0uxMm1JZaRw21Tffn8/Wu0XQ7hR9+YMwfJ2QKwHs8n1pxpXkE= Received: by 10.78.204.7 with SMTP id b7mr259231hug.1178741981923; Wed, 09 May 2007 13:19:41 -0700 (PDT) Received: by 10.78.120.4 with HTTP; Wed, 9 May 2007 13:19:41 -0700 (PDT) Message-ID: <3bbf2fe10705091319p2820353cj5f0cecbaaa3eb3c9@mail.gmail.com> Date: Wed, 9 May 2007 22:19:41 +0200 From: "Attilio Rao" Sender: asmrookie@gmail.com To: "John Baldwin" In-Reply-To: <200705091543.33002.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200705062110.l46LAZqE011583@repoman.freebsd.org> <200705091457.39167.jhb@freebsd.org> <3bbf2fe10705091233t405121d2qda9a058ecf4124bc@mail.gmail.com> <200705091543.33002.jhb@freebsd.org> X-Google-Sender-Auth: 79df603030b4c8d9 Cc: 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:19:44 -0000 2007/5/9, John Baldwin : > 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. Ok, in this case so he effectively needs to bind to the CPU. Attilio -- Peace can only be achieved by understanding - A. Einstein