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: <48fe508d-ecb9-4607-aab6-cc18b4bc78e9@linux.alibaba.com>
Date: Thu, 5 Dec 2024 14:06:40 +0800
From: Baolin Wang <baolin.wang@...ux.alibaba.com>
To: Barry Song <21cnbao@...il.com>
Cc: akpm@...ux-foundation.org, david@...hat.com,
 ying.huang@...ux.alibaba.com, ziy@...dia.com, linux-mm@...ck.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: migrate: drop redundant anonymous statistics for file
 folios migration



On 2024/12/5 13:00, Barry Song wrote:
> On Thu, Dec 5, 2024 at 4:54 PM Baolin Wang
> <baolin.wang@...ux.alibaba.com> wrote:
>>
>> Commit 5d65c8d758f2 ("mm: count the number of anonymous THPs per size") adds
>> a new anonymous counter per THP size, however, when folio_mapping() is not NULL
>> during folio migration, it means this is not an anonymous folio, so remove the
>> redundant anonymous statistics in this case.
> 
> why? Are you sure anon folios won't call __folio_migrate_mapping()?
> folio->mapping is PAGE_MAPPING_ANON for anon folios.
> 
> static __always_inline bool folio_test_anon(const struct folio *folio)
> {
>          return ((unsigned long)folio->mapping & PAGE_MAPPING_ANON) != 0;
> }

Ah, sorry for noise. This just caught my eyes when reading the code, and 
I did not think about it deeply before sending a quick patch. Thanks to 
Barry and Ying for the reminder.

Andrew, please drop this quick patch. Sorry for the trouble.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ