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: <e08b8245-bc8c-4a18-a1e0-53a139258826@linux.alibaba.com>
Date: Fri, 5 Jul 2024 13:47:37 +0800
From: Baolin Wang <baolin.wang@...ux.alibaba.com>
To: Matthew Wilcox <willy@...radead.org>, David Hildenbrand <david@...hat.com>
Cc: akpm@...ux-foundation.org, hughd@...gle.com, wangkefeng.wang@...wei.com,
 ying.huang@...el.com, 21cnbao@...il.com, ryan.roberts@....com,
 shy828301@...il.com, ziy@...dia.com, ioworker0@...il.com,
 da.gomez@...sung.com, p.raghav@...sung.com, linux-mm@...ck.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 0/6] add mTHP support for anonymous shmem



On 2024/7/5 03:49, Matthew Wilcox wrote:
> On Thu, Jul 04, 2024 at 09:19:10PM +0200, David Hildenbrand wrote:
>> On 04.07.24 21:03, David Hildenbrand wrote:
>>>> shmem has two uses:
>>>>
>>>>     - MAP_ANONYMOUS | MAP_SHARED (this patch set)
>>>>     - tmpfs
>>>>
>>>> For the second use case we don't want controls *at all*, we want the
>>>> same heiristics used for all other filesystems to apply to tmpfs.
>>>
>>> As discussed in the MM meeting, Hugh had a different opinion on that.
>>
>> FWIW, I just recalled that I wrote a quick summary:
>>
>> https://lkml.kernel.org/r/f1783ff0-65bd-4b2b-8952-52b6822a0835@redhat.com
>>
>> I believe the meetings are recorded as well, but never looked at recordings.
> 
> That's not what I understood Hugh to mean.  To me, it seemed that Hugh
> was expressing an opinion on using shmem as shmem, not as using it as
> tmpfs.
> 
> If I misunderstood Hugh, well, I still disagree.  We should not have
> separate controls for this.  tmpfs is just not that special.

But now we already have a PMD-mapped THP control for tmpfs, and mTHP 
simply extends this control to per-size.

IIUC, as David mentioned before, for tmpfs, mTHP should act like a huge 
order filter which should be respected by the expected huge orders in 
the write() and fallocate() paths. This would also solve the issue of 
allocating huge orders in writable mmap() path for tmpfs, as well as 
unifying the interface.

Anyway, I will try to provide an RFC to discuss the mTHP for tmpfs approach.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ