> On May 9, 2019, at 9:03 PM, Huang, Ying <[email protected]> wrote: > > Yang Shi <[email protected]> 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.
- [PATCH] mm: vmscan: correct nr_reclaimed for THP Yang Shi
- Re: [PATCH] mm: vmscan: correct nr_reclaimed for TH... Shakeel Butt
- Re: [PATCH] mm: vmscan: correct nr_reclaimed for TH... Huang, Ying
- Re: [PATCH] mm: vmscan: correct nr_reclaimed fo... Yang Shi
- Re: [PATCH] mm: vmscan: correct nr_reclaime... Huang, Ying
- Re: [PATCH] mm: vmscan: correct nr_recl... William Kucharski
- Re: [PATCH] mm: vmscan: correct nr_recl... Yang Shi
- Re: [PATCH] mm: vmscan: correct nr_reclaimed fo... Matthew Wilcox
- Re: [PATCH] mm: vmscan: correct nr_reclaime... Yang Shi
- Re: [PATCH] mm: vmscan: correct nr_recl... Matthew Wilcox
- Re: [PATCH] mm: vmscan: correct nr_reclaime... Ira Weiny
- Re: [PATCH] mm: vmscan: correct nr_recl... Matthew Wilcox
- Re: [PATCH] mm: vmscan: correct nr_reclaime... Yafang Shao
- Re: [PATCH] mm: vmscan: correct nr_reclaime... William Kucharski

