Re: [PATCH v5 6/9] memcg: add kernel calls for memcg dirty page stats

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Feb 27, 2011 at 6:40 PM, KAMEZAWA Hiroyuki
<kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote:
> On Mon, 28 Feb 2011 02:01:43 +0900
> Minchan Kim <minchan.kim@xxxxxxxxx> wrote:
>
>> On Fri, Feb 25, 2011 at 01:35:57PM -0800, Greg Thelen wrote:
>                spin_unlock_irqrestore(&mapping->tree_lock, flags);
>> >     } else {
>> > @@ -1365,6 +1368,7 @@ int test_set_page_writeback(struct page *page)
>> >                                             PAGECACHE_TAG_WRITEBACK);
>> >                     if (bdi_cap_account_writeback(bdi))
>> >                             __inc_bdi_stat(bdi, BDI_WRITEBACK);
>> > +                   mem_cgroup_inc_page_stat(page, MEMCG_NR_FILE_WRITEBACK);
>>
>> Question:
>> Why should we care of BDI_CAP_NO_WRITEBACK?
>>
> Hmm, should we do ..
> ==
>        if (!ret) {
>                account_page_writeback(page);
> +               mem_cgroup_inc_page_stat(page, MEMCG_NR_FILE_WRITEBACL);
>        }
> ==

Yes, I agree with Minchan that this is an issue.  I think Kame's fix
is good.  I will apply Kame's fix to test_set_page_writeback().  I
also found that test_clear_page_writeback() has the same issue and it
will also be fixed.  I will be posting v6 shortly (hopefully today)
with these fixes.

> Thanks,
> -Kame
>
>
_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/containers



[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux