struct pbe *pagedir_nosave;
static unsigned int nr_copy_pages;
static unsigned int nr_meta_pages;
+static unsigned long *buffer;
#ifdef CONFIG_HIGHMEM
unsigned int count_highmem_pages(void)
void *kaddr;
unsigned long pfn = zone_pfn + zone->zone_start_pfn;
- if (!(pfn%1000))
+ if (!(pfn%10000))
printk(".");
if (!pfn_valid(pfn))
continue;
struct zone *zone;
int res = 0;
- pr_debug("swsusp: Saving Highmem\n");
+ pr_debug("swsusp: Saving Highmem");
+ drain_local_pages();
for_each_zone (zone) {
if (is_highmem(zone))
res = save_highmem_zone(zone);
if (res)
return res;
}
+ printk("\n");
return 0;
}
free_pagedir(pblist);
pblist = NULL;
} else
- create_pbe_list(pblist, nr_pages);
+ create_pbe_list(pblist, nr_pages);
return pblist;
}
nr_copy_pages = 0;
nr_meta_pages = 0;
pagedir_nosave = NULL;
+ buffer = NULL;
}
info->cpus = num_online_cpus();
info->image_pages = nr_copy_pages;
info->pages = nr_copy_pages + nr_meta_pages + 1;
+ info->size = info->pages;
+ info->size <<= PAGE_SHIFT;
}
/**
int snapshot_read_next(struct snapshot_handle *handle, size_t count)
{
- static unsigned long *buffer;
-
if (handle->page > nr_meta_pages + nr_copy_pages)
return 0;
if (!buffer) {
int snapshot_write_next(struct snapshot_handle *handle, size_t count)
{
- static unsigned long *buffer;
int error = 0;
if (handle->prev && handle->page > nr_meta_pages + nr_copy_pages)