Suspend2 Merge: Supress various actions/errors while suspending [1/5]
Subsystems (2)
PATCH 1/1 Suspend2 Merge: Supress various actions/errors while suspending [1/5]
Patch 1:
Disable the OOM killer while suspend is running.
Regards,
Nigel
mm/oom_kill.c +5 -0
@@ -20,6 +20,7 @@#include <linux/swap.h> #include <linux/timex.h> #include <linux/jiffies.h> +#include <linux/suspend.h> /* #define DEBUG */
@@ -230,6 +231,10 @@static unsigned long first, last, count, lastkill;unsigned long now, since; +#ifdef CONFIG_SOFTWARE_SUSPEND2 +if (software_suspend_state &SOFTWARE_SUSPEND_RUNNING ) +return ; +#endif spin_lock (&oom_lock); now = jiffies; since = now - last;
Signature · 7 lines
Nigel Cunningham Pastoral Worker Christian Reformed Church of Tuggeranong PO Box 1004, Tuggeranong, ACT 2901 Many today claim to be tolerant. True tolerance, however, can cope with others being intolerant.
mm/oom_kill.c line 240
Quoted 7 lines · Nigel Cunningham
mm/oom_kill.c +4
-0+#ifdef CONFIG_SOFTWARE_SUSPEND2 +if (software_suspend_state &SOFTWARE_SUSPEND_RUNNING ) +return ; +#endif spin_lock (&oom_lock); now = jiffies; since = now - last;
Any chance you could...
#ifdef CONFIG_SOFTWARE_SUSPEND2
<whatever-it-is-now>
#else
#define software_suspend_state 0
#endif
...and thereby eliminate all the #ifdefs in the main codepaths?
--Adam
Hi.
Quoted 11 lines · Adam Kropelin
mm/oom_kill.c line 240
Quoted 7 lines · Nigel Cunningham
mm/oom_kill.c +4
-0+#ifdef CONFIG_SOFTWARE_SUSPEND2 +if (software_suspend_state &SOFTWARE_SUSPEND_RUNNING ) +return ; +#endif spin_lock (&oom_lock); now = jiffies; since = now - last;Any chance you could...
Quoted 7 lines
#ifdef
CONFIG_SOFTWARE_SUSPEND2
<whatever-it-is-now>
#else
#definesoftware_suspend_state0
#endif...and thereby eliminate all the #ifdefs in the main codepaths?
Will do.
Thanks for the suggestion.
Nigel
Signature · 7 lines
Nigel Cunningham Pastoral Worker Christian Reformed Church of Tuggeranong PO Box 1004, Tuggeranong, ACT 2901 Many today claim to be tolerant. True tolerance, however, can cope with others being intolerant.