lkml.org 
[lkml]   [2004]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectSuspend 2 merge: 16/51: Disable cache reaping during suspend.
From
Date
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:08    [from the cache]
©2003-2011 Jasper Spaans