Commit 8a54cd5b authored by Pali Rohár's avatar Pali Rohár Committed by Rafael J. Wysocki

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: default avatarPali Rohár <pali.rohar@gmail.com>
[rjw: Subject]
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent aa9abe2c
......@@ -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.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment