Messages in this thread Patch in this message | | | From | Nigel Cunningham <> | Subject | [Suspend2][ 3/7] [Suspend2] Pages for zone. | Date | Tue, 27 Jun 2006 08:31:39 +1000 |
| |
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/
| |