* [PATCH] Suspend2 Merge: Supress various actions/errors while suspending [1/5]
@ 2004-09-16 23:51 Nigel Cunningham
2004-09-17 2:03 ` Adam Kropelin
0 siblings, 1 reply; 3+ messages in thread
From: Nigel Cunningham @ 2004-09-16 23:51 UTC (permalink / raw)
To: Andrew Morton, Linux Kernel Mailing List
Patch 1:
Disable the OOM killer while suspend is running.
Regards,
Nigel
diff -ruN linux-2.6.9-rc1/mm/oom_kill.c software-suspend-linux-2.6.9-rc1-rev3/mm/oom_kill.c
--- linux-2.6.9-rc1/mm/oom_kill.c 2004-09-07 21:59:01.000000000 +1000
+++ software-suspend-linux-2.6.9-rc1-rev3/mm/oom_kill.c 2004-09-09 19:36:24.000000000 +1000
@@ -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;
--
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Suspend2 Merge: Supress various actions/errors while suspending [1/5]
2004-09-16 23:51 [PATCH] Suspend2 Merge: Supress various actions/errors while suspending [1/5] Nigel Cunningham
@ 2004-09-17 2:03 ` Adam Kropelin
2004-09-17 6:15 ` Nigel Cunningham
0 siblings, 1 reply; 3+ messages in thread
From: Adam Kropelin @ 2004-09-17 2:03 UTC (permalink / raw)
To: Nigel Cunningham; +Cc: Andrew Morton, Linux Kernel Mailing List
On Fri, Sep 17, 2004 at 09:51:03AM +1000, Nigel Cunningham wrote:
> +#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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Suspend2 Merge: Supress various actions/errors while suspending [1/5]
2004-09-17 2:03 ` Adam Kropelin
@ 2004-09-17 6:15 ` Nigel Cunningham
0 siblings, 0 replies; 3+ messages in thread
From: Nigel Cunningham @ 2004-09-17 6:15 UTC (permalink / raw)
To: Adam Kropelin; +Cc: Andrew Morton, Linux Kernel Mailing List
Hi.
On Fri, 2004-09-17 at 12:03, Adam Kropelin wrote:
> On Fri, Sep 17, 2004 at 09:51:03AM +1000, Nigel Cunningham wrote:
> > +#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?
Will do.
Thanks for the suggestion.
Nigel
--
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-09-17 6:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-16 23:51 [PATCH] Suspend2 Merge: Supress various actions/errors while suspending [1/5] Nigel Cunningham
2004-09-17 2:03 ` Adam Kropelin
2004-09-17 6:15 ` Nigel Cunningham
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox