From: Michal Hocko <mhocko@suse.com>
To: Zi Yan <ziy@nvidia.com>
Cc: "Zhouguanghui (OS Kernel)" <zhouguanghui1@huawei.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
akpm@linux-foundation.org,
"Wangkefeng (OS Kernel Lab)" <wangkefeng.wang@huawei.com>,
"Guohanjun (Hanjun Guo)" <guohanjun@huawei.com>,
Dingtianhong <dingtianhong@huawei.com>,
Chenweilong <chenweilong@huawei.com>,
"Xiangrui (Euler)" <rui.xiang@huawei.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Vladimir Davydov <vdavydov.dev@gmail.com>,
Nicholas Piggin <npiggin@gmail.com>
Subject: Re: [PATCH] mm/memcg: set memcg when split pages
Date: Tue, 2 Mar 2021 16:42:16 +0100 [thread overview]
Message-ID: <YD5cwFdfocudINWU@dhcp22.suse.cz> (raw)
In-Reply-To: <1E25514A-202B-48E6-97F2-1E02B0980A96@nvidia.com>
On Tue 02-03-21 10:37:13, Zi Yan wrote:
[...]
> I have a question on copy_page_memcg above. By reading __memcg_kmem_charge_page
> and __memcg_kmem_uncharge_page, it seems to me that every single page requires
> a css_get(&memcg->css) at charge time and a css_put(&memcg->css) at uncharge time.
> But your copy_page_memcg does not do css_get for split subpages. Will it cause
> memcg->css underflow when subpages are uncharged?
yes, well spotted. I have completely missed that. This will also discard
my comment on testing the memcg.
--
Michal Hocko
SUSE Labs
next prev parent reply other threads:[~2021-03-02 19:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-02 1:34 [PATCH] mm/memcg: set memcg when split pages Zhou Guanghui
2021-03-02 1:59 ` Zi Yan
2021-03-02 7:05 ` Zhouguanghui (OS Kernel)
2021-03-02 15:37 ` Zi Yan
2021-03-02 15:42 ` Michal Hocko [this message]
2021-03-02 9:17 ` Michal Hocko
2021-03-02 15:51 ` Michal Hocko
2021-03-02 20:24 ` Hugh Dickins
2021-03-02 22:56 ` Johannes Weiner
2021-03-02 23:49 ` Hugh Dickins
2021-03-03 7:46 ` Michal Hocko
2021-03-03 9:15 ` Zhouguanghui (OS Kernel)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YD5cwFdfocudINWU@dhcp22.suse.cz \
--to=mhocko@suse.com \
--cc=akpm@linux-foundation.org \
--cc=chenweilong@huawei.com \
--cc=dingtianhong@huawei.com \
--cc=guohanjun@huawei.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=npiggin@gmail.com \
--cc=rui.xiang@huawei.com \
--cc=vdavydov.dev@gmail.com \
--cc=wangkefeng.wang@huawei.com \
--cc=zhouguanghui1@huawei.com \
--cc=ziy@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.