linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Oscar Salvador <osalvador@suse.de>, akpm@linux-foundation.org
Cc: mhocko@suse.com, mike.kravetz@oracle.com,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH 2/2] mm,memory_hotplug: Drop redundant hugepage_migration_supported check
Date: Mon, 4 Mar 2019 10:17:26 +0100	[thread overview]
Message-ID: <1b56e6d3-9309-69f3-0ece-228705094975@redhat.com> (raw)
In-Reply-To: <20190304085147.556-3-osalvador@suse.de>

On 04.03.19 09:51, Oscar Salvador wrote:
> has_unmovable_pages() does alreay check whether the hugetlb page supports
> migration, so all non-migrateable hugetlb pages should have been caught there.
> Let us drop the check from scan_movable_pages() as is redundant.
> 
> Signed-off-by: Oscar Salvador <osalvador@suse.de>
> Acked-by: Michal Hocko <mhocko@suse.com>
> ---
>  mm/memory_hotplug.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
> index 0f479c710615..2dfd9a0b0832 100644
> --- a/mm/memory_hotplug.c
> +++ b/mm/memory_hotplug.c
> @@ -1346,8 +1346,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;
> 

Yes, it would actually be a BUG once we reach that point and we suddenly
have !hugepage_migration_supported() in my opinion.

Reviewed-by: David Hildenbrand <david@redhat.com>

-- 

Thanks,

David / dhildenb


  reply	other threads:[~2019-03-04  9:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-04  8:51 [PATCH 0/2] Unlock 1GB-hugetlb on x86_64 Oscar Salvador
2019-03-04  8:51 ` [PATCH 1/2] mm,memory_hotplug: " Oscar Salvador
2019-03-04  8:51 ` [PATCH 2/2] mm,memory_hotplug: Drop redundant hugepage_migration_supported check Oscar Salvador
2019-03-04  9:17   ` David Hildenbrand [this message]
2019-03-18  7:31 ` [PATCH 0/2] Unlock 1GB-hugetlb on x86_64 Oscar Salvador

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1b56e6d3-9309-69f3-0ece-228705094975@redhat.com \
    --to=david@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=mike.kravetz@oracle.com \
    --cc=osalvador@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox