aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/power/main.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2007-05-06 17:50:43 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-07 15:12:59 -0400
commit74dfd666de861c97d47bdbd892f6d21b801d0247 (patch)
tree7200946212cf546f4e5fac31db3dc97dbb144300 /kernel/power/main.c
parent7be9823491ecbaf9700d7d3502cb4b4dd0ed868a (diff)
swsusp: do not use page flags
Make swsusp use memory bitmaps instead of page flags for marking 'nosave' and free pages. This allows us to 'recycle' two page flags that can be used for other purposes. Also, the memory needed to store the bitmaps is allocated when necessary (ie. before the suspend) and freed after the resume which is more reasonable. The patch is designed to minimize the amount of changes and there are some nice simplifications and optimizations possible on top of it. I am going to implement them separately in the future. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/power/main.c')
-rw-r--r--kernel/power/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/power/main.c b/kernel/power/main.c
index b21c2a56f960..5a779270cdbc 100644
--- a/kernel/power/main.c
+++ b/kernel/power/main.c
@@ -244,6 +244,7 @@ static int enter_state(suspend_state_t state)
244 return error; 244 return error;
245} 245}
246 246
247#ifdef CONFIG_SOFTWARE_SUSPEND
247/* 248/*
248 * This is main interface to the outside world. It needs to be 249 * This is main interface to the outside world. It needs to be
249 * called from process context. 250 * called from process context.
@@ -252,6 +253,7 @@ int software_suspend(void)
252{ 253{
253 return enter_state(PM_SUSPEND_DISK); 254 return enter_state(PM_SUSPEND_DISK);
254} 255}
256#endif
255 257
256 258
257/** 259/**