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] sparse: makes dom0 boot on SMP

To: Ryan Grimm <grimm@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] sparse: makes dom0 boot on SMP
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Thu, 13 Oct 2005 08:06:09 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 13 Oct 2005 07:11:38 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <Pine.LNX.4.63.0510121747130.9168@xxxxxxxxxxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <Pine.LNX.4.63.0510121747130.9168@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

On 13 Oct 2005, at 00:13, Ryan Grimm wrote:

i assume the original motivation of changing NS_PER_TICK to a 64-bit value was for the jiffies_to_st function, since it includes a multiply, delta * NS_PER_TICK.

The only other function NS_PER_TICK seems to appear in is timer_interrupt(). i do not know why the original change from signed to unsigned would cause dom0 to fail on my smp machines. perhaps someone with more knowledge of time.c can shed some light?

Yes, that change is definitely broken. It can cause the kernel to spin in the following loops if delta is ever -ve (because s64 gets promoted to u64 by std C rules, -ve becomes *big* +ve):
  while ( delta > NS_PER_TICK )
    .....

I'll change it back -- the main thing was to make 'delta' a 64-bit quantity in jiffies_to_st(), which is independent of whether NS_PER_TICK is signed or not.

 -- Keir


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

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