ia64/xen-unstable

changeset 4295:573e67095682

bitkeeper revision 1.1159.272.10 (4242f845cpppoqILZOUsc9BDNxlTUA)

Set a block timeout at least a jiffy ahead, to have same behaviour
as native Linux.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Thu Mar 24 17:26:29 2005 +0000 (2005-03-24)
parents 5cc6d3dc47d0
children 7e0520c972fb 2fa2e30bcbde 4d084ce2061d
files linux-2.6.11-xen-sparse/arch/xen/i386/kernel/time.c
line diff
     1.1 --- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/time.c	Wed Mar 23 09:07:45 2005 +0000
     1.2 +++ b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/time.c	Thu Mar 24 17:26:29 2005 +0000
     1.3 @@ -673,6 +673,7 @@ int set_timeout_timer(void)
     1.4  {
     1.5  	u64 alarm = 0;
     1.6  	int ret = 0;
     1.7 +	unsigned long j;
     1.8  
     1.9  	/*
    1.10  	 * This is safe against long blocking (since calculations are
    1.11 @@ -681,7 +682,10 @@ int set_timeout_timer(void)
    1.12  	 * would first get locked out. It is safe against normal
    1.13  	 * updates of jiffies since interrupts are off.
    1.14  	 */
    1.15 -	alarm = __jiffies_to_st(next_timer_interrupt());
    1.16 +	j = next_timer_interrupt();
    1.17 +	if (j < (jiffies + 1))
    1.18 +		j = jiffies + 1;
    1.19 +	alarm = __jiffies_to_st(j);
    1.20  
    1.21  	/* Failure is pretty bad, but we'd best soldier on. */
    1.22  	if ( HYPERVISOR_set_timer_op(alarm) != 0 )