[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b8930783-ec73-7330-903f-93a81efb2cd3@linux.alibaba.com>
Date: Fri, 10 May 2019 08:48:58 -0700
From: Yang Shi <yang.shi@...ux.alibaba.com>
To: William Kucharski <william.kucharski@...cle.com>,
"Huang, Ying" <ying.huang@...el.com>
Cc: hannes@...xchg.org, mhocko@...e.com, mgorman@...hsingularity.net,
kirill.shutemov@...ux.intel.com, hughd@...gle.com,
akpm@...ux-foundation.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: vmscan: correct nr_reclaimed for THP
On 5/9/19 9:33 PM, William Kucharski wrote:
>
>> On May 9, 2019, at 9:03 PM, Huang, Ying <ying.huang@...el.com> wrote:
>>
>> Yang Shi <yang.shi@...ux.alibaba.com> writes:
>>
>>> On 5/9/19 7:12 PM, Huang, Ying wrote:
>>>> How about to change this to
>>>>
>>>>
>>>> nr_reclaimed += hpage_nr_pages(page);
>>> Either is fine to me. Is this faster than "1 << compound_order(page)"?
>> I think the readability is a little better. And this will become
>>
>> nr_reclaimed += 1
>>
>> if CONFIG_TRANSPARENT_HUAGEPAGE is disabled.
> I find this more legible and self documenting, and it avoids the bit shift
> operation completely on the majority of systems where THP is not configured.
Yes, I do agree. Thanks for the suggestion.
>
Powered by blists - more mailing lists