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 1 of 5] xentrace: fix t_info_pages calculation fo

To: Keir Fraser <keir@xxxxxxx>
Subject: Re: [Xen-devel] [PATCH 1 of 5] xentrace: fix t_info_pages calculation for the default case
From: Olaf Hering <olaf@xxxxxxxxx>
Date: Wed, 23 Mar 2011 13:46:54 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, George Dunlap <george.dunlap@xxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxxxx>
Delivery-date: Wed, 23 Mar 2011 05:47:33 -0700
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1300884421; l=934; s=domk; d=aepfle.de; h=In-Reply-To:Content-Type:MIME-Version:References:Subject:Cc:To:From: Date:X-RZG-CLASS-ID:X-RZG-AUTH; bh=px2yvTGtZVTS5cFqE5UvUrszX6U=; b=oAfCsyNlG0jlD7OXPfBNOKW6+0LntiD9mb5XbKHrMxgSJLfxbALxory0SqSHPf65jAh C3GWKzPSk8EHNEQJwTJWEq4okkHMo2/Sp89ShMcMgkcLtofXpkferf6cw8BvFgyqb+CeW Iw1cd6MgdNuRSfzP3lzfmF527qUwk5EgRDU=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C9AF98FF.2BC96%keir@xxxxxxx>
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: <20110323112040.GB28535@xxxxxxxxx> <C9AF98FF.2BC96%keir@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.21 (2010-09-15)
On Wed, Mar 23, Keir Fraser wrote:

> On 23/03/2011 11:20, "Olaf Hering" <olaf@xxxxxxxxx> wrote:
> 
> >>>>      t_info_pages /= PAGE_SIZE;
> >>>> -    if ( t_info_pages % PAGE_SIZE )
> >>>> +    if ( t_info_pages % PAGE_SIZE || t_info_pages == 0 )
> >>> 
> >>> While certainly not having a significant effect, to the unsuspecting
> >>> reader this looks like a bug - is it really meant to be a remainder
> >>> operation on the *result* of a division (rather than on the original
> >>> dividend)? Couldn't you just (ab)use PFN_UP() here?
> >> 
> >> By which you mean to replace the division and subsequent if statement with
> >> t_info_pages = PFN_UP(t_info_pages).
> > 
> > I did not know about PFN_UP() until now, using it would work as well.
> 
> As opposed to the existing code (even including your latest patch) which
> doesn't work properly. You need to respin at least your patch 1/5.

I will send the bugfix now.

Olaf

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>