[Suspend2][ 3/7] [Suspend2] Pages for zone.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Find out how many pages are used for the bitmap for a given zone.

Signed-off-by: Nigel Cunningham <[email protected]>

 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux