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: <f0c962cf-20db-4ca8-897c-b64a5976bb89@linux.alibaba.com>
Date: Fri, 19 Dec 2025 09:42:20 +0800
From: Baolin Wang <baolin.wang@...ux.alibaba.com>
To: Wei Yang <richard.weiyang@...il.com>,
 "David Hildenbrand (Red Hat)" <david@...nel.org>
Cc: Zi Yan <ziy@...dia.com>, Bijan Tabatabai <bijan311@...il.com>,
 linux-mm@...ck.org, linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
 lorenzo.stoakes@...cle.com, Liam.Howlett@...cle.com, vbabka@...e.cz,
 rppt@...nel.org, surenb@...gle.com, mhocko@...e.com, shivankg@....com,
 Hugh Dickins <hughd@...gle.com>, Chris Li <chrisl@...nel.org>,
 Kairui Song <kasong@...cent.com>
Subject: Re: [PATCH] mm: Consider non-anon swap cache folios in
 folio_expected_ref_count()



On 2025/12/19 08:21, Wei Yang wrote:
> On Wed, Dec 17, 2025 at 02:04:16AM +0100, David Hildenbrand (Red Hat) wrote:
>>>>>
>>>>> I am not very familiar with the memory hot-(un)plug or swapping code, so
>>>>> I am not 100% certain if this patch actually solves the root of the
>>>>> problem. I believe the issue is from shmem folios, in which case I believe
>>>>> this patch is correct. However, I couldn't think of an easy way to confirm
>>>>> that the affected folios were from shmem. I guess it could be possible that
>>>>> the root cause could be from some bug where some anonymous pages do not
>>>>> return true to folio_test_anon(). I don't think that's the case, but
>>>>> figured the MM maintainers would have a better idea of what's going on.
>>>
>>> I am not sure about if shmem in swapcache causes the issue, since
>>> the above setup does not involve shmem. +Baolin and Hugh for some insight.
>>
>> We might just push out another unrelated shmem page to swap as we create
>> memory pressure in the system I think.
>>
> 
> One trivial question: currently we only put anon/shmem folio in swapcache,
> right?

AFAICT, Yes (note a special case for anonymous folios: lazyfree 
anonymous folios will be directly freed instead of being swapped out).

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ