|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] Re: [PATCH 4/7] bio-cgroup: Split the cgroup memory subsyste
To: |
righi.andrea@xxxxxxxxx |
Subject: |
[Xen-devel] Re: [PATCH 4/7] bio-cgroup: Split the cgroup memory subsystem into two parts |
From: |
Hirokazu Takahashi <taka@xxxxxxxxxxxxx> |
Date: |
Tue, 05 Aug 2008 19:35:51 +0900 (JST) |
Cc: |
xen-devel@xxxxxxxxxxxxxxxxxxx, containers@xxxxxxxxxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx, dm-devel@xxxxxxxxxx, agk@xxxxxxxxxxxxxx, ryov@xxxxxxxxxxxxx |
Delivery-date: |
Tue, 05 Aug 2008 03:36:17 -0700 |
Envelope-to: |
www-data@xxxxxxxxxxxxxxxxxxx |
In-reply-to: |
<48982A9D.2000803@xxxxxxxxx> |
List-help: |
<mailto:xen-devel-request@lists.xensource.com?subject=help> |
List-id: |
Xen developer discussion <xen-devel.lists.xensource.com> |
List-post: |
<mailto:xen-devel@lists.xensource.com> |
List-subscribe: |
<http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe> |
List-unsubscribe: |
<http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe> |
References: |
<20080804.175707.104036289.ryov@xxxxxxxxxxxxx> <20080804.175748.189722512.ryov@xxxxxxxxxxxxx> <48982A9D.2000803@xxxxxxxxx> |
Sender: |
xen-devel-bounces@xxxxxxxxxxxxxxxxxxx |
Hi, Andrea,
> you can remove some ifdefs doing:
I think you don't have to care about this much, since one of the following
patches removes most of these ifdefs.
> #ifdef CONFIG_CGROUP_MEM_RES_CTLR
> if (likely(!memcg)) {
> rcu_read_lock();
> mem = mem_cgroup_from_task(rcu_dereference(mm->owner));
> /*
> * For every charge from the cgroup, increment reference count
> */
> css_get(&mem->css);
> rcu_read_unlock();
> } else {
> mem = memcg;
> css_get(&memcg->css);
> }
> while (res_counter_charge(&mem->res, PAGE_SIZE)) {
> if (!(gfp_mask & __GFP_WAIT))
> goto out;
>
> if (try_to_free_mem_cgroup_pages(mem, gfp_mask))
> continue;
>
> /*
> * try_to_free_mem_cgroup_pages() might not give us a full
> * picture of reclaim. Some pages are reclaimed and might be
> * moved to swap cache or just unmapped from the cgroup.
> * Check the limit again to see if the reclaim reduced the
> * current usage of the cgroup before giving up
> */
> if (res_counter_check_under_limit(&mem->res))
> continue;
>
> if (!nr_retries--) {
> mem_cgroup_out_of_memory(mem, gfp_mask);
> goto out;
> }
> }
> pc->mem_cgroup = mem;
> #endif /* CONFIG_CGROUP_MEM_RES_CTLR */
> _______________________________________________
> Containers mailing list
> Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
> https://lists.linux-foundation.org/mailman/listinfo/containers
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|