------- Comment From <email address hidden> 2017-09-18 15:39 EDT-------
>
> However 6e2a092a48d3 does contain some changes that seem unrelated to the
> new interface, could you please advise whether or not these need to be
> reapplied?
>
> diff --git a/mm/huge_memory.c b/mm/huge_memory.c
> index 85742ac5b32e..a7bac4f2b78a 100644
> --- a/mm/huge_memory.c
> +++ b/mm/huge_memory.c
> @@ -2129,9 +2129,12 @@ static void freeze_page(struct page *page)
> static void unfreeze_page(struct page *page)
> {
> int i;
> -
> - for (i = 0; i < HPAGE_PMD_NR; i++)
> - remove_migration_ptes(page + i, page + i, true);
> + if (PageTransHuge(page)) {
> + remove_migration_ptes(page, page, true);
> + } else {
> + for (i = 0; i < HPAGE_PMD_NR; i++)
> + remove_migration_ptes(page + i, page + i, true);
> + }
> }
>
> static void __split_huge_page_tail(struct page *head, int tail,
the above change should have been applied independently of all the other changes in 6e2a092a48d3.
The change avoids calling remove_migration_ptes() on all sub pages, when it knows that only the head page needs to removed from migration. With or without the change the code works. However, it saves some cycles, with the change.
------- Comment From <email address hidden> 2017-09-18 15:39 EDT------- .a7bac4f2b78a 100644 page(struct page *page) migration_ ptes(page + i, page + i, true); page)) { migration_ ptes(page, page, true); migration_ ptes(page + i, page + i, true); huge_page_ tail(struct page *head, int tail,
>
> However 6e2a092a48d3 does contain some changes that seem unrelated to the
> new interface, could you please advise whether or not these need to be
> reapplied?
>
> diff --git a/mm/huge_memory.c b/mm/huge_memory.c
> index 85742ac5b32e.
> --- a/mm/huge_memory.c
> +++ b/mm/huge_memory.c
> @@ -2129,9 +2129,12 @@ static void freeze_page(struct page *page)
> static void unfreeze_
> {
> int i;
> -
> - for (i = 0; i < HPAGE_PMD_NR; i++)
> - remove_
> + if (PageTransHuge(
> + remove_
> + } else {
> + for (i = 0; i < HPAGE_PMD_NR; i++)
> + remove_
> + }
> }
>
> static void __split_
the above change should have been applied independently of all the other changes in 6e2a092a48d3. migration_ ptes() on all sub pages, when it knows that only the head page needs to removed from migration. With or without the change the code works. However, it saves some cycles, with the change.
The change avoids calling remove_