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]
Date: Tue, 23 Apr 2024 17:45:02 +0800
From: Lance Yang <ioworker0@...il.com>
To: baolin.wang@...ux.alibaba.com
Cc: 21cnbao@...il.com,
	akpm@...ux-foundation.org,
	david@...hat.com,
	hughd@...gle.com,
	linux-kernel@...r.kernel.org,
	linux-mm@...ck.org,
	ryan.roberts@....com,
	shy828301@...il.com,
	wangkefeng.wang@...wei.com,
	willy@...radead.org,
	ying.huang@...el.com,
	ziy@...dia.com
Subject: Re: [RFC PATCH 5/5] mm: shmem: add anonymous share mTHP counters

On 2024/4/23 09:17, Barry Song wrote:
[...]
>> diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h
>> index 26b6fa98d8ac..67b9c1acad31 100644
>> --- a/include/linux/huge_mm.h
>> +++ b/include/linux/huge_mm.h
>> @@ -270,6 +270,8 @@ enum mthp_stat_item {
>>          MTHP_STAT_ANON_SWPOUT,
>>          MTHP_STAT_ANON_SWPOUT_FALLBACK,
>>          MTHP_STAT_ANON_SWPIN_REFAULT,
>> +       MTHP_STAT_SHMEM_ANON_ALLOC,
>> +       MTHP_STAT_SHMEM_ANON_ALLOC_FALLBACK,
> 
> not quite sure about this. for 2MB pmd-mapped THP shmem, we count them
> as FILE_THP.
> here we are counting as SHMEM_ANON. To me, SHMEM_ANON is more correct but
> it doesn't align with pmd-mapped THP. David, Ryan, what do you think?

+1

IMO, shmem isn't actually file-backed, but it has file-backed-like
characteristics :)

FWIW, perhaps MTHP_STAT_FILE_ALLOC and MTHP_STAT_FILE_ALLOC_FALLBACK
would better align with PMD/PTE-mapped THP.

Thanks,
Lance

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ