WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] Fix xenoprof counter overflow check

To: "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Fix xenoprof counter overflow check
From: "Niraj Tolia" <ntolia@xxxxxxxxx>
Date: Tue, 6 Jan 2009 10:37:04 -0800
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 06 Jan 2009 10:37:29 -0800
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:references; bh=PzBHKq53ATUtCe7wuCOHUkFKpWn885IdOB+RhJZ5nFM=; b=kjUMZ2NK+fzRJz3qS9XKnOibT5ibvt8/q0gsYp/UuVbUenA6H2t+xRbGyirCOUXPz2 jO6WGqG3pKUT9ab8t1051AJDCrJ1r37wGXRImJV721eou8llzuZl2PboXiwCfA2NB6tn g9n6KGPBimLHpBjkcKqoFBi0jLdNPbw1ABL6Y=
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:references; b=bcLZzy19C875jaVwoMpDlPFZ9DBYMQ0FhRXGqMWPrXwTuuNDTQks9/3r3pWiAnl4Oo zvXOSg8/ikKzyqMAhRmNGNuoWSFYvzAXDdAd0g/xSJrmgjQFy7NKiXIoNOCb8IIpZQeM LfZ4cd+bdIzDddL36M/CekAMd1xgwubstAfPA=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C58916CF.13D3%keir.fraser@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <eb1ad7bbdaf3ae553a6b.1231217351@niraj-desktop> <C58916CF.13D3%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Tue, Jan 6, 2009 at 6:10 AM, Keir Fraser <keir.fraser@xxxxxxxxxxxxx> wrote:
On 06/01/2009 04:49, "Niraj Tolia" <ntolia@xxxxxxxxx> wrote:

> # HG changeset patch
> # User Niraj Tolia <ntolia@xxxxxxxxx>
> # 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@xxxxxxxxx>

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/
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel