From: Mike Kravetz <mike.kravetz@oracle.com>
To: Li Xinhai <lixinhai.lxh@gmail.com>,
linux-mm@kvack.org, akpm@linux-foundation.org
Cc: Michal Hocko <mhocko@suse.com>,
Anshuman Khandual <anshuman.khandual@arm.com>,
Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Subject: Re: [PATCH v5] mm/mempolicy: Checking hugepage migration is supported by arch in vma_migratable
Date: Thu, 23 Jan 2020 15:24:54 -0800 [thread overview]
Message-ID: <1dec1a81-0b67-b356-f31c-8c87ae15f14c@oracle.com> (raw)
In-Reply-To: <1579786179-30633-1-git-send-email-lixinhai.lxh@gmail.com>
On 1/23/20 5:29 AM, Li Xinhai wrote:
> vma_migratable() is called to check if pages in vma can be migrated
> before go ahead to further actions. Currently it is used in below code
> path:
> - task_numa_work
> - mbind
> - move_pages
>
> For hugetlb mapping, whether vma is migratable or not is determined by:
> - CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION
> - arch_hugetlb_migration_supported
>
> Issue: current code only checks for CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION
> alone, and no code should use it directly. (note that current code in
> vma_migratable don't cause failure or bug because
> unmap_and_move_huge_page() will catch unsupported hugepage and handle it
> properly)
>
> This patch checks the two factors by hugepage_migration_supported for
> impoving code logic and robustness. It will enable early bail out of
> hugepage migration procedure, but because currently all architecture
> supporting hugepage migration is able to support all page size, we would
> not see performance gain with this patch applied.
>
> vma_migratable() is moved to mm/mempolicy.c, because of the circular
> reference of mempolicy.h and hugetlb.h cause defining it as inline not
> feasible.
>
> Signed-off-by: Li Xinhai <lixinhai.lxh@gmail.com>
> Cc: Michal Hocko <mhocko@suse.com>
> Cc: Mike Kravetz <mike.kravetz@oracle.com>
> Cc: Anshuman Khandual <anshuman.khandual@arm.com>
> Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Thanks for continuing to refine this! The commit message looks much better.
Un-inlining vma_migratable() should not be an issue as no hot paths make use
of the routine.
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
--
Mike Kravetz
next prev parent reply other threads:[~2020-01-23 23:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-23 13:29 [PATCH v5] mm/mempolicy: Checking hugepage migration is supported by arch in vma_migratable Li Xinhai
2020-01-23 16:56 ` Michal Hocko
2020-01-23 23:24 ` Mike Kravetz [this message]
2020-01-24 2:12 ` Anshuman Khandual
2020-01-24 2:36 ` HORIGUCHI NAOYA(堀口 直也)
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=1dec1a81-0b67-b356-f31c-8c87ae15f14c@oracle.com \
--to=mike.kravetz@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=anshuman.khandual@arm.com \
--cc=linux-mm@kvack.org \
--cc=lixinhai.lxh@gmail.com \
--cc=mhocko@suse.com \
--cc=n-horiguchi@ah.jp.nec.com \
/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;
as well as URLs for NNTP newsgroup(s).