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: <2909ce59-86ba-ea0b-479f-756020fb32af@linux.alibaba.com>
Date:   Thu, 13 Jun 2019 10:13:19 -0700
From:   Yang Shi <yang.shi@...ux.alibaba.com>
To:     "Kirill A. Shutemov" <kirill@...temov.name>
Cc:     ktkhai@...tuozzo.com, kirill.shutemov@...ux.intel.com,
        hannes@...xchg.org, mhocko@...e.com, hughd@...gle.com,
        shakeelb@...gle.com, rientjes@...gle.com,
        akpm@...ux-foundation.org, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [v3 PATCH 2/4] mm: move mem_cgroup_uncharge out of
 __page_cache_release()



On 6/13/19 4:39 AM, Kirill A. Shutemov wrote:
> On Thu, Jun 13, 2019 at 05:56:47AM +0800, Yang Shi wrote:
>> The later patch would make THP deferred split shrinker memcg aware, but
>> it needs page->mem_cgroup information in THP destructor, which is called
>> after mem_cgroup_uncharge() now.
>>
>> So, move mem_cgroup_uncharge() from __page_cache_release() to compound
>> page destructor, which is called by both THP and other compound pages
>> except HugeTLB.  And call it in __put_single_page() for single order
>> page.
>
> If I read the patch correctly, it will change behaviour for pages with
> NULL_COMPOUND_DTOR. Have you considered it? Are you sure it will not break
> anything?

So far a quick search shows NULL_COMPOUND_DTOR is not used by any type 
of compound page. The HugeTLB code sets destructor to NULL_COMPOUND_DTOR 
when freeing hugetlb pages via hugetlb specific destructor.

The prep_new_page() would call prep_compound_page() if __GFP_COMP is 
used, which sets dtor to COMPOUND_PAGE_DTOR by default.  Just hugetlb 
and THP set their specific dtors.

And, it looks __put_compound_page() doesn't check if dtor is NULL or not 
at all.

>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ