[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <d3966b09-ce41-9e92-e676-262e84b8e2e1@huawei.com>
Date: Fri, 12 Aug 2022 09:59:12 +0800
From: Miaohe Lin <linmiaohe@...wei.com>
To: "Wang, Haiyue" <haiyue.wang@...el.com>
CC: "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
Linux-MM <linux-mm@...ck.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
Naoya Horiguchi <naoya.horiguchi@...ux.dev>,
David Hildenbrand <david@...hat.com>
Subject: Re: Linux 5.19 __NR_move_pages failed for hugepage
On 2022/8/11 16:01, Wang, Haiyue wrote:
> Hi Miaohe,
>
>
Hi Haiyue,
Many thanks for your report and debug.
>
> When I call “*syscall (__NR_move_pages, 0, n_pages, ptr, 0, status, 0)*” to get the huge page node
>
> information, it is failed with ‘-2’ returned in ‘status’ array.
>
>
>
> After some debug, I found that “*follow_huge_pud*” will return NULL if ‘*FOLL_GET*’ is set.
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e66f17ff71772b209eed39de35aaa99ba819c93d <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e66f17ff71772b209eed39de35aaa99ba819c93d>
>
>
>
> This will make your patch doesn’t work for huge page.
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4cd614841c06338a087769ee3cfa96718784d1f5 <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4cd614841c06338a087769ee3cfa96718784d1f5>
>
Supporting of ‘*FOLL_GET*’ in follow_huge_pud is introduced via the below commit:
https://lore.kernel.org/all/20220714042420.1847125-9-naoya.horiguchi@linux.dev/T/#mb3c83df087fba454b7b4ea32227fb8775ca70081
But that's still not perfect yet. For s390 version of follow_huge_pud, FOLL_GET is still not supported. And pgd level
hugepage doesn't support FOLL_GET now.
>
>
> Not sure you know this issue or not, just share my debug information.
I'm not sure whether it's better to revert my above "problematic" patch first then add it back when all hugetlb pages support FOLL_GET.
Or we could just live with it? Any thoughts?
Thanks,
Miaohe Lin
>
>
>
> BR,
>
> Haiyue
>
>
>
Powered by blists - more mailing lists