mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Suspend2 Merge: Supress various actions/errors while suspending [5/5]
@ 2004-09-16 23:53 Nigel Cunningham
  0 siblings, 0 replies; only message in thread
From: Nigel Cunningham @ 2004-09-16 23:53 UTC (permalink / raw)
  To: Andrew Morton, Linux Kernel Mailing List

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.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-09-16 23:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-16 23:53 [PATCH] Suspend2 Merge: Supress various actions/errors while suspending [5/5] Nigel Cunningham

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®