summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorPali Rohár <pali.rohar@gmail.com>2014-05-06 13:01:56 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-05-07 01:51:16 +0200
commit8a54cd5bd6ebf009b96ec79510b593f7ba5c0ff3 (patch)
tree3ca0ab1a76dec969fabf3e2adb97d1842b0de4dd /Documentation
parentaa9abe2c8eddf426c9b89757129b132c484ee223 (diff)
downloadop-kernel-dev-8a54cd5bd6ebf009b96ec79510b593f7ba5c0ff3.zip
op-kernel-dev-8a54cd5bd6ebf009b96ec79510b593f7ba5c0ff3.tar.gz
PM / hibernate: Documentation: Fix script for unswapping
System can have mmaped also character devices (e.g dri devices by X) or deleted files. Running cat on character devices is really bad idea (system can hang) so run cat only on regular files. Also mmaped files can have spaces in filenames. Signed-off-by: Pali Rohár <pali.rohar@gmail.com> [rjw: Subject] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/power/swsusp.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/Documentation/power/swsusp.txt b/Documentation/power/swsusp.txt
index 079160e..f732a83 100644
--- a/Documentation/power/swsusp.txt
+++ b/Documentation/power/swsusp.txt
@@ -220,7 +220,10 @@ Q: After resuming, system is paging heavily, leading to very bad interactivity.
A: Try running
-cat `cat /proc/[0-9]*/maps | grep / | sed 's:.* /:/:' | sort -u` > /dev/null
+cat /proc/[0-9]*/maps | grep / | sed 's:.* /:/:' | sort -u | while read file
+do
+ test -f "$file" && cat "$file" > /dev/null
+done
after resume. swapoff -a; swapon -a may also be useful.
OpenPOWER on IntegriCloud