lkml.org 
[lkml]   [2019]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] mm: vmscan: correct nr_reclaimed for THP
From
Date


On 5/10/19 9:52 AM, Matthew Wilcox wrote:
> On Fri, May 10, 2019 at 09:50:04AM -0700, Yang Shi wrote:
>> On 5/10/19 9:36 AM, Matthew Wilcox wrote:
>>> On Fri, May 10, 2019 at 10:12:40AM +0800, Huang, Ying wrote:
>>>>> + nr_reclaimed += (1 << compound_order(page));
>>>> How about to change this to
>>>>
>>>> nr_reclaimed += hpage_nr_pages(page);
>>> Please don't. That embeds the knowledge that we can only swap out either
>>> normal pages or THP sized pages. I'm trying to make the VM capable of
>>> supporting arbitrary-order pages, and this would be just one more place
>>> to fix.
>>>
>>> I'm sympathetic to the "self documenting" argument. My current tree has
>>> a patch in it:
>>>
>>> mm: Introduce compound_nr
>>> Replace 1 << compound_order(page) with compound_nr(page). Minor
>>> improvements in readability.
>>>
>>> It goes along with this patch:
>>>
>>> mm: Introduce page_size()
>>>
>>> It's unnecessarily hard to find out the size of a potentially huge page.
>>> Replace 'PAGE_SIZE << compound_order(page)' with page_size(page).
>> So you prefer keeping using  "1 << compound_order" as v1 did? Then you will
>> convert all "1 << compound_order" to compound_nr?
> Yes. Please, let's merge v1 and ignore v2.

Fine to me. I think Andrew will take care of it, Andrew?


\
 
 \ /
  Last update: 2019-05-10 18:55    [W:0.053 / U:0.924 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site