[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190228092154.GV10588@dhcp22.suse.cz>
Date: Thu, 28 Feb 2019 10:21:54 +0100
From: Michal Hocko <mhocko@...nel.org>
To: Oscar Salvador <osalvador@...e.de>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org, david@...hat.com,
mike.kravetz@...cle.com
Subject: Re: [RFC PATCH] mm,memory_hotplug: Unlock 1GB-hugetlb on x86_64
On Thu 21-02-19 10:42:12, Oscar Salvador wrote:
[...]
> diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
> index d5f7afda67db..04f6695b648c 100644
> --- a/mm/memory_hotplug.c
> +++ b/mm/memory_hotplug.c
> @@ -1337,8 +1337,7 @@ static unsigned long scan_movable_pages(unsigned long start, unsigned long end)
> if (!PageHuge(page))
> continue;
> head = compound_head(page);
> - if (hugepage_migration_supported(page_hstate(head)) &&
> - page_huge_active(head))
> + if (page_huge_active(head))
> return pfn;
> skip = (1 << compound_order(head)) - (page - head);
> pfn += skip - 1;
Is this part correct? Say we have a gigantic page which is migrateable.
Now scan_movable_pages would skip it and we will not migrate it, no?
> @@ -1378,10 +1377,6 @@ do_migrate_range(unsigned long start_pfn, unsigned long end_pfn)
>
> if (PageHuge(page)) {
> struct page *head = compound_head(page);
> - if (compound_order(head) > PFN_SECTION_SHIFT) {
> - ret = -EBUSY;
> - break;
> - }
> pfn = page_to_pfn(head) + (1<<compound_order(head)) - 1;
> isolate_huge_page(head, &source);
> continue;
I think it would be much easier to have only this check removed in this
patch. Because it is obviously bogus and wrong as well. The other check
might be considered in a separate patch.
--
Michal Hocko
SUSE Labs
Powered by blists - more mailing lists