Re: [RFC 5/5] Memory controller soft limit reclaim on contention

From: KAMEZAWA Hiroyuki
Date: Sat Jun 28 2008 - 00:17:22 EST


On Fri, 27 Jun 2008 20:49:06 +0530
Balbir Singh <balbir@xxxxxxxxxxxxxxxxxx> wrote:

> +
> + while (count-- &&
> + ((mem = heap_delete_max(&mem_cgroup_heap)) != NULL)) {
> + BUG_ON(!mem->on_heap);
> + spin_unlock_irqrestore(&mem_cgroup_heap_lock, flags);
> + nr_reclaimed += try_to_free_mem_cgroup_pages(mem,
> + gfp_mask);
> + cond_resched();
> + spin_lock_irqsave(&mem_cgroup_heap_lock, flags);
> + mem->on_heap = 0;
It seems "mem* is not on heap after heap_delete_max(), right ?
If so, I think this on_heap should be cleared right after heap_delete_max().


> + /*
> + * What should be the basis of breaking out?
> + */
> + if (nr_reclaimed)
> + goto done;

why stops here ?

Thanks,
-Kame

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