diff options
author | Joerg Roedel <jroedel@suse.de> | 2014-09-30 13:31:29 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-09-30 21:12:20 +0200 |
commit | fdd64ed54eeba6b8619b36dcc7cb6442f2c6da0c (patch) | |
tree | ebaca3059701e9f42eb5455af02f5d5fba83462e /net/rds/iw.c | |
parent | 905563ff47db35dcb3f69e69d434207270ad1966 (diff) | |
download | linux-fdd64ed54eeba6b8619b36dcc7cb6442f2c6da0c.tar.bz2 |
PM / hibernate: Iterate over set bits instead of PFNs in swsusp_free()
The existing implementation of swsusp_free iterates over all
pfns in the system and checks every bit in the two memory
bitmaps.
This doesn't scale very well with large numbers of pfns,
especially when the bitmaps are not populated very densly.
Change the algorithm to iterate over the set bits in the
bitmaps instead to make it scale better in large memory
configurations.
Also add a memory_bm_clear_current() helper function that
clears the bit for the last position returned from the
memory bitmap.
This new version adds a !NULL check for the memory bitmaps
before they are walked. Not doing so causes a kernel crash
when the bitmaps are NULL.
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'net/rds/iw.c')
0 files changed, 0 insertions, 0 deletions