Message ID | 1367271946-7239-9-git-send-email-ccross@android.com (mailing list archive) |
---|---|
State | RFC, archived |
Headers | show |
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index 14be27f..e036276 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c @@ -47,6 +47,7 @@ #include <linux/sched/sysctl.h> #include <linux/sched/rt.h> #include <linux/timer.h> +#include <linux/freezer.h> #include <asm/uaccess.h> @@ -1525,7 +1526,7 @@ static int __sched do_nanosleep(struct hrtimer_sleeper *t, enum hrtimer_mode mod t->task = NULL; if (likely(t->task)) - schedule(); + freezable_schedule(); hrtimer_cancel(&t->timer); mode = HRTIMER_MODE_ABS;
Avoid waking up every thread sleeping in a nanosleep call during suspend and resume by calling a freezable blocking call. Signed-off-by: Colin Cross <ccross@android.com> --- kernel/hrtimer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)