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:   Thu, 23 Nov 2023 17:14:39 -0800
From:   John Hubbard <jhubbard@...dia.com>
To:     David Hildenbrand <david@...hat.com>,
        Matthew Wilcox <willy@...radead.org>
Cc:     Ryan Roberts <ryan.roberts@....com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Yin Fengwei <fengwei.yin@...el.com>,
        Yu Zhao <yuzhao@...gle.com>,
        Catalin Marinas <catalin.marinas@....com>,
        Anshuman Khandual <anshuman.khandual@....com>,
        Yang Shi <shy828301@...il.com>,
        "Huang, Ying" <ying.huang@...el.com>, Zi Yan <ziy@...dia.com>,
        Luis Chamberlain <mcgrof@...nel.org>,
        Itaru Kitayama <itaru.kitayama@...il.com>,
        "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
        David Rientjes <rientjes@...gle.com>,
        Vlastimil Babka <vbabka@...e.cz>,
        Hugh Dickins <hughd@...gle.com>,
        Kefeng Wang <wangkefeng.wang@...wei.com>, linux-mm@...ck.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [RESEND PATCH v7 00/10] Small-sized THP for anonymous memory

On 11/23/23 08:50, David Hildenbrand wrote:
> On 23.11.23 17:18, Matthew Wilcox wrote:
>> On Thu, Nov 23, 2023 at 05:05:37PM +0100, David Hildenbrand wrote:
>>> On 23.11.23 16:59, Matthew Wilcox wrote:
>>>> On Wed, Nov 22, 2023 at 04:29:40PM +0000, Ryan Roberts wrote:
>>>>> Note: I'm resending this at Andrew's suggestion due to having 
>>>>> originally sent
>>>>> it during LPC. I'm hoping its in a position where the feedback is 
>>>>> minor enough
>>>>> that I can rework in time for v6.8, but so far haven't had any.
>>>>>
>>>>> Hi All,
>>>>>
>>>>> This is v7 of a series to implement small-sized THP for anonymous 
>>>>> memory
>>>>> (previously called "large anonymous folios"). The objective of this 
>>>>> is to
>>>>
>>>> I'm still against small-sized THP.  We've now got people asking whether
>>>> the THP counters should be updated when dealing with large folios that
>>>> are smaller than PMD sized.  It's sowing confusion, and we should go
>>>> back to large anon folios as a name.
>>>>
>>>
>>> I disagree.
>>>
>>> https://lore.kernel.org/all/65dbdf2a-9281-a3c3-b7e3-a79c5b60b357@redhat.com/
>>
>> And yet:
>> https://lore.kernel.org/linux-mm/20231106193315.GB3661273@cmpxchg.org/
>>
>> "This is a small THP so we don't account it as a THP, we only account
>> normal THPs as THPs" is a bizarre position to take.
>>
>> Not to mention that saying a foo is a small huge baz is just bizarre.
>> Am I a small giant?  Or just a large human?
> 
> I like that analogy. Yet, "small giant" sounds "bigger" in some way IMHO ;)
> 
> I'll note that "small-sized THP" is just a temporary feature name, it 
> won't be exposed as such to the user in sysfs etc. In a couple of years, 
> it will be forgotten.
> 
> To me it makes sense: it's a hugepage (not a page) but smaller compared 
> to what we previously had. But again, there won't be a "small_thp" 
> toggle anywhere.
> 
> Long-term it's simply going to be a THP. Quoting from my writeup:
> 
> "Nowadays, when somebody says that they are using hugetlb huge pages, 
> the first question frequently is "which huge page size?". The same will
> happen with transparent huge pages I believe.".
> 
> 
> Regarding the accounting: as I said a couple of times, "AnonHugePages" 
> should have been called "AnonPmdMapped" or similar; that's what it 
> really is: as soon as a THP is PTE-mapped, it's not accounted there. But 
> we can't fix that I guess, unless we add some "world switch" for any 
> workloads that would care about a different accounting.
> 
> So we're really only concerned about:
> * AnonHugePages
> * ShmemHugePages
> * FileHugePages


The v6 patchset had these counters:

/proc/vmstat:  nr_anon_thp_pte
/proc/meminfo: AnonHugePteMap

...which leads to another naming possibility: pte-thp, or pte-mapped-thp,
something along those lines.

pte-thp avoids the "small huge" complaint, at least.


thanks,
-- 
John Hubbard
NVIDIA

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ