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  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 21 May 2020 17:04:11 -0700
From:   Matthew Wilcox <willy@...radead.org>
To:     Dave Chinner <david@...morbit.com>
Cc:     linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 00/36] Large pages in the page cache

On Fri, May 22, 2020 at 08:49:06AM +1000, Dave Chinner wrote:
> Ok, so the main issue I have with the filesystem/iomap side of
> things is that it appears to be adding "transparent huge page"
> awareness to the filesysetm code, not "large page support".
> 
> For people that aren't aware of the difference between the
> transparent huge and and a normal compound page (e.g. I have no idea
> what the difference is), this is likely to cause problems,
> especially as you haven't explained at all in this description why
> transparent huge pages are being used rather than bog standard
> compound pages.

The primary reason to use a different name from compound_*
is so that it can be compiled out for systems that don't enable
CONFIG_TRANSPARENT_HUGEPAGE.  So THPs are compound pages, as they always
have been, but for a filesystem, using thp_size() will compile to either
page_size() or PAGE_SIZE depending on CONFIG_TRANSPARENT_HUGEPAGE.

Now, maybe thp_size() is the wrong name, but then you need to suggest
a better name ;-)

> And, really, why should iomap or the filesystems care if the large
> page is a THP or just a high order compound page? The interface
> for operating on these things at the page cache level should be the
> same. We already have page_size() and friends for operating on
> high order compound pages, yet the iomap stuff has this new
> thp_size() function instead of just using page_size(). THis is going
> to lead to confusion and future bugs when people who don't know the
> difference use the wrong page size function in their filesystem
> code.

There is no wrong function to use -- just one that expands to more code
in the case where CONFIG_TRANSPARENT_HUGEPAGE is disabled.

Powered by blists - more mailing lists