[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Set a block timeout at least a jiffy ahead, to have same behaviour



ChangeSet 1.1159.256.70, 2005/03/24 17:26:29+00:00, kaf24@xxxxxxxxxxxxxxxxxxxx

        Set a block timeout at least a jiffy ahead, to have same behaviour
        as native Linux.
        Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>



 time.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletion(-)


diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/time.c 
b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/time.c
--- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/time.c       2005-03-24 
13:02:44 -05:00
+++ b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/time.c       2005-03-24 
13:02:44 -05:00
@@ -673,6 +673,7 @@
 {
        u64 alarm = 0;
        int ret = 0;
+       unsigned long j;
 
        /*
         * This is safe against long blocking (since calculations are
@@ -681,7 +682,10 @@
         * would first get locked out. It is safe against normal
         * updates of jiffies since interrupts are off.
         */
-       alarm = __jiffies_to_st(next_timer_interrupt());
+       j = next_timer_interrupt();
+       if (j < (jiffies + 1))
+               j = jiffies + 1;
+       alarm = __jiffies_to_st(j);
 
        /* Failure is pretty bad, but we'd best soldier on. */
        if ( HYPERVISOR_set_timer_op(alarm) != 0 )


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.