[PATCH] Suspend2 Merge: Supress various actions/errors whilesuspending [5/5]

From: Nigel Cunningham
Date: Thu Sep 16 2004 - 19:01:49 EST


Hi again.

Patch 5: Disable slab reaping during suspend.

Regards,

Nigel

diff -ruN 505-disable-cache-reaping-during-suspend-old/mm/slab.c 505-disable-cache-reaping-during-suspend-new/mm/slab.c
--- 505-disable-cache-reaping-during-suspend-old/mm/slab.c 2004-09-16 08:34:57.000000000 +1000
+++ 505-disable-cache-reaping-during-suspend-new/mm/slab.c 2004-09-16 09:22:20.000000000 +1000
@@ -92,6 +92,7 @@
#include <linux/sysctl.h>
#include <linux/module.h>
#include <linux/rcupdate.h>
+#include <linux/suspend.h>

#include <asm/uaccess.h>
#include <asm/cacheflush.h>
@@ -2733,7 +2734,13 @@
{
struct list_head *walk;

- if (down_trylock(&cache_chain_sem)) {
+#ifdef CONFIG_SOFTWARE_SUSPEND2
+ if ((software_suspend_state & SOFTWARE_SUSPEND_RUNNING) ||
+ (down_trylock(&cache_chain_sem)))
+#else
+ if (down_trylock(&cache_chain_sem))
+#endif
+ {
/* Give up. Setup the next iteration. */
schedule_delayed_work(&__get_cpu_var(reap_work), REAPTIMEOUT_CPUC + smp_processor_id());
return;

--
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.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/