On 5/9/19 9:33 PM, William Kucharski wrote:
On May 9, 2019, at 9:03 PM, Huang, Ying <ying.huang@xxxxxxxxx> wrote:
Yang Shi <yang.shi@xxxxxxxxxxxxxxxxx> 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.