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: <20230324151717.hawuy5gs6cnxql55@blackpad>
Date:   Fri, 24 Mar 2023 16:17:17 +0100
From:   Michal Koutný <mkoutny@...e.com>
To:     Zi Yan <ziy@...dia.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.

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,
Michal

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ