Commit a803561d authored by Patrick Mochel's avatar Patrick Mochel

[power] Add support for refrigerator to the migration_thread.

- The PM code currently must signal each kernel thread when suspending, and
  each thread must call refrigerator() to stop itself. This patch adds 
  support for this to migration_thread, which allows suspend states to work
  on an SMP-enabled kernel (though not necessarily an SMP machine).

- Note I do not know why the process freezing code was designed in such a 
  way. One would think we could do it without having to call each thread
  individually, and fix up the threads that need special work individually..
parent 6eabceee
......@@ -28,6 +28,7 @@
#include <linux/kernel_stat.h>
#include <linux/security.h>
#include <linux/notifier.h>
#include <linux/suspend.h>
#include <linux/blkdev.h>
#include <linux/delay.h>
#include <linux/timer.h>
......@@ -2415,6 +2416,9 @@ static int migration_thread(void * data)
struct list_head *head;
migration_req_t *req;
if (current->flags & PF_FREEZE)
refrigerator(PF_IOTHREAD);
spin_lock_irq(&rq->lock);
head = &rq->migration_queue;
current->state = TASK_INTERRUPTIBLE;
......
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