* [PATCH] Documentation: power: swsusp: Fix script for unswapping
@ 2014-05-06 11:01 Pali Rohár
2014-08-16 15:42 ` Pavel Machek
0 siblings, 1 reply; 2+ messages in thread
From: Pali Rohár @ 2014-05-06 11:01 UTC (permalink / raw)
To: Rafael J. Wysocki, Len Brown, Pavel Machek, Randy Dunlap
Cc: linux-pm, linux-doc, linux-kernel, Pali Rohár
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>
---
Documentation/power/swsusp.txt | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
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.
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Documentation: power: swsusp: Fix script for unswapping
2014-05-06 11:01 [PATCH] Documentation: power: swsusp: Fix script for unswapping Pali Rohár
@ 2014-08-16 15:42 ` Pavel Machek
0 siblings, 0 replies; 2+ messages in thread
From: Pavel Machek @ 2014-08-16 15:42 UTC (permalink / raw)
To: Pali Roh?r
Cc: Rafael J. Wysocki, Len Brown, Randy Dunlap, linux-pm, linux-doc,
linux-kernel
On Tue 2014-05-06 13:01:56, Pali Roh?r wrote:
> 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>
Acked-by: Pavel Machek <pavel@ucw.cz>
> ---
> Documentation/power/swsusp.txt | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> 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.
>
> --
> 1.7.9.5
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-08-16 15:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-06 11:01 [PATCH] Documentation: power: swsusp: Fix script for unswapping Pali Rohár
2014-08-16 15:42 ` Pavel Machek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).