void
ckrm_at_limit(ckrm_mem_res_t *cls)
{
+#ifndef AT_LIMIT_SUPPORT
+#warning "ckrm_at_limit disabled due to problems with memory hog tests"
+#else
struct zone *zone;
unsigned long now = jiffies;
wakeup_kswapd(zone);
break; // only once is enough
}
+#endif // AT_LIMIT_SUPPORT
}
static int unmapped = 0, changed = 0, unchanged = 0, maxnull = 0,
#include <linux/swapops.h>
#include <linux/ckrm_mem.h>
+#ifndef AT_LIMIT_SUPPORT
+#warning "ckrm_at_limit disabled due to problems with memory hog tests -- seting ckrm_shrink_list_empty to true"
+#undef ckrm_shrink_list_empty
+#define ckrm_shrink_list_empty() (1)
+#endif
+
/* possible outcome of pageout() */
typedef enum {
/* failed to write page out, page is locked */
list_add(&page->lru, &l_hold);
ckrm_mem_dec_active(page);
pgmoved++;
- pgscanned++;
- }
+ pgscanned++;
+ }
if (!--nr_pass && ckrm_flags) {
goto redo;
}
}
}
-#ifdef CONFIG_CKRM_RES_MEM
+#if defined(CONFIG_CKRM_RES_MEM) && defined(AT_LIMIT_SUPPORT)
// This function needs to be given more thought.
// Shrink the class to be at 90% of its limit
static void
}
#else
+
+#if defined(CONFIG_CKRM_RES_MEM) && !defined(AT_LIMIT_SUPPORT)
+#warning "disabling ckrm_at_limit -- setting ckrm_shrink_classes to noop "
+#endif
+
#define ckrm_shrink_classes() do { } while(0)
#endif