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] [day] [month] [year] [list]
Message-ID: <59100CE6-1A77-4620-81AC-535A6A68A98F@nvidia.com>
Date:   Fri, 24 Mar 2023 11:22:52 -0400
From:   Zi Yan <ziy@...dia.com>
To:     Michal Koutný <mkoutny@...e.com>
Cc:     "Matthew Wilcox (Oracle)" <willy@...radead.org>,
        Yang Shi <shy828301@...il.com>, Yu Zhao <yuzhao@...gle.com>,
        linux-mm@...ck.org, Andrew Morton <akpm@...ux-foundation.org>,
        linux-kernel@...r.kernel.org, cgroups@...r.kernel.org,
        linux-fsdevel@...r.kernel.org, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH 2/5] mm: page_owner: add support for splitting to any
 order in split page_owner.

On 24 Mar 2023, at 11:17, Michal Koutný wrote:

> Hello.
>
> On Mon, Mar 20, 2023 at 08:48:26PM -0400, Zi Yan <zi.yan@...t.com> wrote:
>> @@ -5746,8 +5746,8 @@ static void *make_alloc_exact(unsigned long addr, unsigned int order,
>>  		struct page *page = virt_to_page((void *)addr);
>>  		struct page *last = page + nr;
>>
>> -		split_page_owner(page, 1 << order);
>> -		split_page_memcg(page, 1 << order);
>> +		split_page_owner(page, 1 << order, 1);
>> +		split_page_memcg(page, 1 << order, 1);
>
> I think here should be
>
>> +		split_page_owner(page, order, 0);
>> +		split_page_memcg(page, 1 << order, 1);
>
> because I was wondering why split_page_memcg() doesn't use orders too?
> (E.g. it wouldn't work well if nr % new_new != 0).

Thanks. Good point. I will make both use orders instead in next version.


--
Best Regards,
Yan, Zi

Download attachment "signature.asc" of type "application/pgp-signature" (855 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ