[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1241620755-22133-5-git-send-email-nigel@tuxonice.net>
Date: Thu, 7 May 2009 00:39:00 +1000
From: Nigel Cunningham <nigel@...onice.net>
To: linux-pm@...ts.linux-foundation.org, linux-kernel@...r.kernel.org,
tuxonice-devel@...ts.tuxonice.net
Cc: Nigel Cunningham <nigel@...onice.net>
Subject: [PATCH 4/19] TuxOnIce: Add support for just thawing kernel threads.
Create a function that just thaws kernel threads (not userspace), so
that TuxOnIce can use it when allocating storage to bmap the space
obtained, without having the potential for significant changes in the
characteristics of an image (which would make preparing an image even
more of an iterative process than it can be now). We also
thaw_kernel_threads when seeking to free memory.
Signed-off-by: Nigel Cunningham <nigel@...onice.net>
---
include/linux/freezer.h | 3 +++
kernel/power/process.c | 4 ++++
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/include/linux/freezer.h b/include/linux/freezer.h
index 5a361f8..4f50655 100644
--- a/include/linux/freezer.h
+++ b/include/linux/freezer.h
@@ -121,6 +121,8 @@ static inline void set_freezable(void)
current->flags &= ~PF_NOFREEZE;
}
+extern void thaw_kernel_threads(void);
+
/*
* Tell the freezer that the current task should be frozen by it and that it
* should send a fake signal to the task to freeze it.
@@ -172,6 +174,7 @@ static inline int freeze_processes(void) { BUG(); return 0; }
static inline void thaw_processes(void) {}
static inline int try_to_freeze(void) { return 0; }
+static inline void thaw_kernel_threads(void) { }
static inline void freezer_do_not_count(void) {}
static inline void freezer_count(void) {}
diff --git a/kernel/power/process.c b/kernel/power/process.c
index ca63401..d464ef7 100644
--- a/kernel/power/process.c
+++ b/kernel/power/process.c
@@ -152,3 +152,7 @@ void thaw_processes(void)
printk("done.\n");
}
+void thaw_kernel_threads(void)
+{
+ thaw_tasks(true);
+}
--
1.5.6.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists