From: "Niraj Tolia" Subject: Re: [PATCH] Fix xenoprof counter overflow check Date: Tue, 6 Jan 2009 10:37:04 -0800 Message-ID: <7e45e2ac0901061037j19a8303eq792603eec4fb4735@mail.gmail.com> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1500840276==" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --===============1500840276== Content-Type: multipart/alternative; boundary="----=_Part_194876_21997991.1231267024987" ------=_Part_194876_21997991.1231267024987 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Tue, Jan 6, 2009 at 6:10 AM, Keir Fraser wrote: > On 06/01/2009 04:49, "Niraj Tolia" wrote: > > > # HG changeset patch > > # User Niraj Tolia > > # Date 1231217146 28800 > > # Node ID eb1ad7bbdaf3ae553a6bf319180b5880f5ac4307 > > # Parent 8417ddc981b407753f966c568ef8c7b673d8d22a > > Xenoprof patch to fix the counter overflow check for CPUs with counter > > width > 32 > > > > I had to port this patch from mainline Linux where it can be found at > > > http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff > ; > > h=7c64ade53a6f977d73f16243865c42ceae999aea > > > > Signed-off-by: Niraj Tolia > > This patch can't possibly build, and is pointless anyway since the overflow While the mainline patch won't build, the one attached definitely does. That said, I see your point about the overflow. Now I need to figure out why this broken patch actually enables xenoprof to work on my Intel Xeon. The only reason would be the switch from CTR_READ() (which uses rdmsr() internally) to rdmsrl() but let me dig into it. Cheers, Niraj > > width check is still hardcoded to 32 bits in CTR_OVERFLOWED(). > > -- Keir > -- Niraj Tolia, Researcher, HP Labs http://www.hpl.hp.com/personal/Niraj_Tolia/ ------=_Part_194876_21997991.1231267024987 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Tue, Jan 6, 2009 at 6:10 AM, Keir Fraser <keir.fraser@eu.citrix.com> wrote:
On 06/01/2009 04:49, "Niraj Tolia" <ntolia@gmail.com> wrote:

> # HG changeset patch
> # User Niraj Tolia <ntolia@gmail.com>
> # Date 1231217146 28800
> # Node ID eb1ad7bbdaf3ae553a6bf319180b5880f5ac4307
> # Parent  8417ddc981b407753f966c568ef8c7b673d8d22a
> Xenoprof patch to fix the counter overflow check for CPUs with counter
> width > 32
>
> I had to port this patch from mainline Linux where it can be found at
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;
> h=7c64ade53a6f977d73f16243865c42ceae999aea
>
> Signed-off-by: Niraj Tolia <ntolia@gmail.com>

This patch can't possibly build, and is pointless anyway since the overflow


While the mainline patch won't build, the one attached definitely does. That said, I see your point about the overflow. Now I need to figure out why this broken patch actually enables xenoprof to work on my Intel Xeon. The only reason would be the switch from CTR_READ() (which uses rdmsr() internally) to rdmsrl() but let me dig into it.

Cheers,
Niraj
 

width check is still hardcoded to 32 bits in CTR_OVERFLOWED().

 -- Keir

--
Niraj Tolia, Researcher, HP Labs
http://www.hpl.hp.com/personal/Niraj_Tolia/
------=_Part_194876_21997991.1231267024987-- --===============1500840276== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============1500840276==--