Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 212375
b: refs/heads/master
c: dbeeec5
h: refs/heads/master
i:
  212373: 58b1b42
  212371: 06e2674
  212367: 03deb7c
v: v3
  • Loading branch information
Rafael J. Wysocki committed Oct 16, 2010
1 parent 6687c3c commit 3ce3eea
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5fc62aad4e7779c2f04691e48b351d08c050c1f1
refs/heads/master: dbeeec5fe868f2e2e92fe94daa2c5a047240fdc4
2 changes: 2 additions & 0 deletions trunk/include/linux/suspend.h
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,8 @@ static inline int unregister_pm_notifier(struct notifier_block *nb)
}

#define pm_notifier(fn, pri) do { (void)(fn); } while (0)

static inline bool pm_check_wakeup_events(void) { return true; }
#endif /* !CONFIG_PM_SLEEP */

extern struct mutex pm_mutex;
Expand Down
11 changes: 9 additions & 2 deletions trunk/kernel/power/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ static int try_to_freeze_tasks(bool sig_only)
struct timeval start, end;
u64 elapsed_csecs64;
unsigned int elapsed_csecs;
bool wakeup = false;

do_gettimeofday(&start);

Expand Down Expand Up @@ -78,6 +79,11 @@ static int try_to_freeze_tasks(bool sig_only)
if (!todo || time_after(jiffies, end_time))
break;

if (!pm_check_wakeup_events()) {
wakeup = true;
break;
}

/*
* We need to retry, but first give the freezing tasks some
* time to enter the regrigerator.
Expand All @@ -97,8 +103,9 @@ static int try_to_freeze_tasks(bool sig_only)
* but it cleans up leftover PF_FREEZE requests.
*/
printk("\n");
printk(KERN_ERR "Freezing of tasks failed after %d.%02d seconds "
printk(KERN_ERR "Freezing of tasks %s after %d.%02d seconds "
"(%d tasks refusing to freeze, wq_busy=%d):\n",
wakeup ? "aborted" : "failed",
elapsed_csecs / 100, elapsed_csecs % 100,
todo - wq_busy, wq_busy);

Expand All @@ -107,7 +114,7 @@ static int try_to_freeze_tasks(bool sig_only)
read_lock(&tasklist_lock);
do_each_thread(g, p) {
task_lock(p);
if (freezing(p) && !freezer_should_skip(p))
if (!wakeup && freezing(p) && !freezer_should_skip(p))
sched_show_task(p);
cancel_freezing(p);
task_unlock(p);
Expand Down

0 comments on commit 3ce3eea

Please sign in to comment.