lkml.org 
[lkml]   [2012]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH -V9 11/15] hugetlb/cgroup: Add charge/uncharge routines for hugetlb cgroup
Date


Hi Andrew,

Andrew Morton <akpm@linux-foundation.org> writes:

> On Thu, 14 Jun 2012 16:58:05 +0800
> Li Zefan <lizefan@huawei.com> wrote:
>
>> > +int hugetlb_cgroup_charge_cgroup(int idx, unsigned long nr_pages,
>>
>> > + struct hugetlb_cgroup **ptr)
>> > +{
>> > + int ret = 0;
>> > + struct res_counter *fail_res;
>> > + struct hugetlb_cgroup *h_cg = NULL;
>> > + unsigned long csize = nr_pages * PAGE_SIZE;
>> > +
>> > + if (hugetlb_cgroup_disabled())
>> > + goto done;
>> > + /*
>> > + * We don't charge any cgroup if the compound page have less
>> > + * than 3 pages.
>> > + */
>> > + if (huge_page_order(&hstates[idx]) < HUGETLB_CGROUP_MIN_ORDER)
>> > + goto done;
>> > +again:
>> > + rcu_read_lock();
>> > + h_cg = hugetlb_cgroup_from_task(current);
>> > + if (!h_cg)
>>
>>
>> In no circumstances should h_cg be NULL.
>>
>
> Aneesh?

I missed this in the last review. Thanks for reminding. I will send a
patch addressing this and another related comment in
4FD9A6B6.50503@huawei.com as a separate mail.

-aneesh



\
 
 \ /
  Last update: 2012-06-24 19:21    [W:0.070 / U:1.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site