[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-kernel
Subject:    Re: [PATCH] mm: vmscan: correct nr_reclaimed for THP
From:       Yafang Shao <laoar.shao () gmail ! com>
Date:       2019-05-11 4:09:57
Message-ID: CALOAHbCs62ynCEeTqAr7wx2TerFmK1ZBp_9r5jh-oP36tGMXDg () mail ! gmail ! com
[Download RAW message or body]

On Sat, May 11, 2019 at 12:36 AM Matthew Wilcox <willy@infradead.org> 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.

Agreed.
compound_order() is more general than hpage_nr_pages().
It seems to me that hpage_nr_pages() is a little  abuse in lots of places.

Thanks
Yafang
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic