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: Jan Beulich <JBeulich@xxxxxxxxxx>, Olaf Hering <olaf@xxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 1 of 5] xentrace: fix t_info_pages calculation for the default case
From: Keir Fraser <keir.xen@xxxxxxxxx>
Date: Wed, 23 Mar 2011 10:22:16 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, George Dunlap <george.dunlap@xxxxxxxxxx>
Delivery-date: Wed, 23 Mar 2011 03:23:28 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:user-agent:date:subject:from:to:cc:message-id :thread-topic:thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; bh=4iCNd1W6d2XVcKQ34YRXcdvOV/rLRDrnwhmUZaYIsF0=; b=nBNEa5x6mgk6SlLT7m/TWY9jKec32OvaEOvPlKgJiZl3rnApJNjSdn9voIjw9/QqI3 JrY3bbb5UyfgV/rehf6noeD/A1CKbsRdvJzb1pv3IzQYm+iYLP5q90v9WUi32GoGwB06 xcAqrFSJP3c4Fp3AzY1Tae6Fv6LA9SFbkNTpk=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=user-agent:date:subject:from:to:cc:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; b=RIX89V7i0fcdvhqE8MjypAmVW40dck/NM7Mu/HwxdJWxyEu+i8GGjFPZlS/Wija0Ao v7R89V0+gdoLMc4ZWWPrquhxln36Qpwd+Wb+twZ7ei55nm/oTLo3DVtT45hCWguhAts/ aDA/R61HAFrmnArNZzqcMGdy7t2KPz7KOlfWs=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4D89D5920200007800037DBE@xxxxxxxxxxxxxxxxxx>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcvpRC6nwwvZIsE8AkqMefXoB9icWw==
Thread-topic: [Xen-devel] [PATCH 1 of 5] xentrace: fix t_info_pages calculation for the default case
User-agent: Microsoft-Entourage/12.28.0.101117
On 23/03/2011 10:12, "Jan Beulich" <JBeulich@xxxxxxxxxx> 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).

That would make sense to me. The suggested change in the patch series looks
nonsensical.

 -- Keir



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

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