lkml.org 
[lkml]   [2006]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[Suspend2][ 3/7] [Suspend2] Pages for zone.
Date
Find out how many pages are used for the bitmap for a given zone.

Signed-off-by: Nigel Cunningham <nigel@suspend2.net>

kernel/power/pageflags.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/kernel/power/pageflags.c b/kernel/power/pageflags.c
index 3781fc8..ec028d3 100644
--- a/kernel/power/pageflags.c
+++ b/kernel/power/pageflags.c
@@ -37,3 +37,9 @@ static int num_zones(void)
return result;
}

+static int pages_for_zone(struct zone *zone)
+{
+ return (zone->spanned_pages + (PAGE_SIZE << 3) - 1) /
+ (PAGE_SIZE << 3);
+}
+
--
Nigel Cunningham nigel at suspend2 dot net
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-06-27 00:35    [W:0.036 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site