lkml.org 
[lkml]   [2023]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v6] mm/filemap: remove hugetlb special casing in filemap.c
From
On 8/18/23 11:34 AM, Mike Kravetz wrote:
> On 08/18/23 19:09, Matthew Wilcox wrote:
>>
>> There's also a conceptual reduction in complexity. We no longer need to
>> think about whether the inode is hugetlb or not before doing the lookup
>> and scaling the byte offset differently.
>
> I 'think' this was the primary motivation for this patch.
>
> Recent discussions about HGM always came back to hugetlb special case code
> in the core mm. HGM would add a little more, and most people thought there
> was too much already. Most everyone in those discussions agreed there
> should be some effort to unify hugetlb and core mm code as much as possible
> to reduce these special cases. This is one step in that direction.
>

yes, the motivation for this patch came from the discussion about the
various places in mm where hugetlb is special cased and how there should
be an effort to unify these cases. As Matthew mentions, this series gets
rid of branches that would occur on every page cache lookup. The
comments in pagemap.h also mention

- * (TODO: remove once hugetlb pages will have ->index in PAGE_SIZE)
so this has been a goal for the page cache.

Thanks
Sidhartha Kumar

> As a hugetlb maintainer, I don't like any decrease in performance even
> if it is not readily observable. However, as a member of the mm community
> I like the fact that there is less special case hugetlb code. Overall,
> I consider this a win.

\
 
 \ /
  Last update: 2023-08-18 20:55    [W:4.764 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site