From: Mukesh Rathor Subject: Re: [timer/ticks related] dom0 hang during boot on large 1TB system Date: Mon, 21 Dec 2009 20:00:25 -0800 Message-ID: <20091221200025.3641d635@mantra.us.oracle.com> References: <20091217203636.76a10aea@mantra.us.oracle.com> <20091218204318.180e58f3@mantra.us.oracle.com> <4B2FC9E5.4050001@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4B2FC9E5.4050001@oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Steve Ofsthun Cc: Magenheimer , "Xen-devel@lists.xensource.com" , Hackel , Dan, jeremy@goop.org, Keir Fraser , Kurt@acsinet11.oracle.com List-Id: xen-devel@lists.xenproject.org On Mon, 21 Dec 2009 14:17:57 -0500 Steve Ofsthun wrote: > As Keir suggests, the correct solution is probably to use the > time_before/after macros appropriately. > > The proposed code avoids the problem by accessing jiffies_64 instead. can't use time_after/before as they do signed comparisions. time_after(a,b): ((long)(b) - (long)(a) < 0)) thus, time_after(0xFFFEDB09, 0xFFFEDB08) will return true as will time_after(0x1020, 0xFFFEDB08) as they are both after 0xFFFEDB08. For wrapping, unsigned comparision must be done, which is also the jiffies data type.