RE: [PATCH v3 2/2] mm: fix the handling Non-LRU pages returned by follow_page

From: Wang, Haiyue
Date: Sun Aug 14 2022 - 21:47:43 EST


> -----Original Message-----
> From: Huang, Ying <ying.huang@xxxxxxxxx>
> Sent: Monday, August 15, 2022 09:40
> To: Wang, Haiyue <haiyue.wang@xxxxxxxxx>
> Cc: linux-mm@xxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; akpm@xxxxxxxxxxxxxxxxxxxx; david@xxxxxxxxxx;
> linmiaohe@xxxxxxxxxx; songmuchun@xxxxxxxxxxxxx; naoya.horiguchi@xxxxxxxxx; alex.sierra@xxxxxxx; Felix
> Kuehling <Felix.Kuehling@xxxxxxx>; Alistair Popple <apopple@xxxxxxxxxx>
> Subject: Re: [PATCH v3 2/2] mm: fix the handling Non-LRU pages returned by follow_page
>
> Haiyue Wang <haiyue.wang@xxxxxxxxx> writes:
>
> > The page returned by follow_page with 'FOLL_GET' has get_page called, so
>
> Better to add "()" after function name to improve the readability, for
> example, "follow_page()".

Got it, didn't notice this. ;-)

>
> > it needs to call put_page for handling the reference count correctly.
> >
> > And as David reviewed, "device pages are never PageKsm pages". Drop this
> > zone device page check for break_ksm.
> >
> > Fixes: 3218f8712d6b ("mm: handling Non-LRU pages returned by vm_normal_pages")
>
> In your patch description, I cannot find how the above commit is related
> to the bug you fixed. Add some words about that?

The first commit session, but maybe not very clear, will try to add more words
In v4.

>
> Best Regards,
> Huang, Ying
>
> > Signed-off-by: Haiyue Wang <haiyue.wang@xxxxxxxxx>
> > ---
> > mm/huge_memory.c | 4 ++--
> > mm/ksm.c | 12 +++++++++---
> > mm/migrate.c | 10 +++++++---
> > 3 files changed, 18 insertions(+), 8 deletions(-)
> >