lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YD5cwFdfocudINWU@dhcp22.suse.cz>
Date:   Tue, 2 Mar 2021 16:42:16 +0100
From:   Michal Hocko <mhocko@...e.com>
To:     Zi Yan <ziy@...dia.com>
Cc:     "Zhouguanghui (OS Kernel)" <zhouguanghui1@...wei.com>,
        linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        akpm@...ux-foundation.org,
        "Wangkefeng (OS Kernel Lab)" <wangkefeng.wang@...wei.com>,
        "Guohanjun (Hanjun Guo)" <guohanjun@...wei.com>,
        Dingtianhong <dingtianhong@...wei.com>,
        Chenweilong <chenweilong@...wei.com>,
        "Xiangrui (Euler)" <rui.xiang@...wei.com>,
        Johannes Weiner <hannes@...xchg.org>,
        Vladimir Davydov <vdavydov.dev@...il.com>,
        Nicholas Piggin <npiggin@...il.com>
Subject: Re: [PATCH] mm/memcg: set memcg when split pages

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ