child_guarantee_changed(&parres->shares, res->shares.my_guarantee, 0);
child_maxlimit_changed_local(parres);
}
- ckrm_mem_evaluate_all_pages();
- res->core = NULL;
-
spin_lock(&ckrm_mem_lock);
list_del(&res->mcls_list);
spin_unlock(&ckrm_mem_lock);
mem_class_put(res);
+ ckrm_mem_evaluate_all_pages();
return;
}
{
int i, j, mask = 0;
- if (*flags == 0) {
- *extract = 0;
+ if (*extract == 0 || *flags == 0) {
return;
}
-
if (*flags & CLS_SHRINK) {
*extract = CLS_SHRINK;
*flags = 0;
return;
}
+
i = fls(*flags);
for (j = i-1; j > 0; j--) {
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,
}
spin_unlock_irq(&zone->lru_lock);
}
- printk(KERN_DEBUG "all_pages: active %d inactive %d cleared %d\n",
+ printk("all_pages: active %d inactive %d cleared %d\n",
active, inactive, cleared);
spin_lock(&ckrm_mem_lock);
list_for_each_entry(res, &ckrm_memclass_list, mcls_list) {
inact_cnt += res->nr_inactive[idx];
idx++;
}
- printk(KERN_DEBUG "all_pages: %s: tmp_cnt %d; act_cnt %d inact_cnt %d\n",
+ printk("all_pages: %s: tmp_cnt %d; act_cnt %d inact_cnt %d\n",
res->core->name, res->tmp_cnt, act_cnt, inact_cnt);
}
spin_unlock(&ckrm_mem_lock);