Suspend 2 merge: 16/51: Disable cache reaping during suspend.

From: Nigel Cunningham
Date: Wed Nov 24 2004 - 11:18:43 EST


I have to admit to being a little unsure as to why this is needed, but
suspend's reliability is helped a lot by disabling cache reaping while
suspending. Perhaps one of the mm guys will be able to enlighten me
here. Might be SMP related.

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-11-03 21:55:05.000000000 +1100
+++ 505-disable-cache-reaping-during-suspend-new/mm/slab.c 2004-11-06 09:25:01.972547184 +1100
@@ -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>
@@ -2730,7 +2731,9 @@
{
struct list_head *walk;

- if (down_trylock(&cache_chain_sem)) {
+ if ((unlikely(test_suspend_state(SUSPEND_RUNNING))) ||
+ (down_trylock(&cache_chain_sem)))
+ {
/* Give up. Setup the next iteration. */
schedule_delayed_work(&__get_cpu_var(reap_work), REAPTIMEOUT_CPUC + smp_processor_id());
return;


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