Commit 69913927 authored by Nishanth Aravamudan's avatar Nishanth Aravamudan Committed by Tony Luck

[IA64] use msleep_interruptible() instead of schedule_timeout

Description: Replace schedule_timeout() with msleep_interruptible() to
guarantee the task delays as expected.
Signed-off-by: default avatarNishanth Aravamudan <nacc@us.ibm.com>
Acked-by: default avatarDean Nelson <dcn@sgi.com>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent d0feafbf
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
#include <linux/cache.h> #include <linux/cache.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/delay.h>
#include <asm/sn/intr.h> #include <asm/sn/intr.h>
#include <asm/sn/sn_sal.h> #include <asm/sn/sn_sal.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
...@@ -308,8 +309,7 @@ xpc_make_first_contact(struct xpc_partition *part) ...@@ -308,8 +309,7 @@ xpc_make_first_contact(struct xpc_partition *part)
"partition %d\n", XPC_PARTID(part)); "partition %d\n", XPC_PARTID(part));
/* wait a 1/4 of a second or so */ /* wait a 1/4 of a second or so */
set_current_state(TASK_INTERRUPTIBLE); msleep_interruptible(250);
(void) schedule_timeout(0.25 * HZ);
if (part->act_state == XPC_P_DEACTIVATING) { if (part->act_state == XPC_P_DEACTIVATING) {
return part->reason; return part->reason;
...@@ -841,9 +841,7 @@ xpc_do_exit(void) ...@@ -841,9 +841,7 @@ xpc_do_exit(void)
down(&xpc_discovery_exited); down(&xpc_discovery_exited);
set_current_state(TASK_INTERRUPTIBLE); msleep_interruptible(300);
schedule_timeout(0.3 * HZ);
set_current_state(TASK_RUNNING);
/* wait for all partitions to become inactive */ /* wait for all partitions to become inactive */
...@@ -860,12 +858,8 @@ xpc_do_exit(void) ...@@ -860,12 +858,8 @@ xpc_do_exit(void)
} }
} }
if (active_part_count) { if (active_part_count)
set_current_state(TASK_INTERRUPTIBLE); msleep_interruptible(300);
schedule_timeout(0.3 * HZ);
set_current_state(TASK_RUNNING);
}
} while (active_part_count > 0); } while (active_part_count > 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment