Messages in this thread Patch in this message | | | From | Colin Cross <> | Subject | [PATCH 08/10] nanosleep: use freezable blocking call | Date | Mon, 29 Apr 2013 14:45:44 -0700 |
| |
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(-)
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; -- 1.8.2.1
| |