From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>,
akpm@linux-foundation.org, Michal Hocko <mhocko@kernel.org>,
mpe@ellerman.id.au, paulus@samba.org,
David Gibson <david@gibson.dropbear.id.au>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH V5 1/3] mm: Add get_user_pages_cma_migrate
Date: Thu, 20 Dec 2018 15:28:52 +1100 [thread overview]
Message-ID: <da69679a-9455-aea6-6d3c-f36c2b8c641b@ozlabs.ru> (raw)
In-Reply-To: <20181219034047.16305-2-aneesh.kumar@linux.ibm.com>
On 19/12/2018 14:40, Aneesh Kumar K.V wrote:
> This helper does a get_user_pages_fast and if it find pages in the CMA area
> it will try to migrate them before taking page reference. This makes sure that
> we don't keep non-movable pages (due to page reference count) in the CMA area.
> Not able to move pages out of CMA area result in CMA allocation failures.
>
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
> ---
> include/linux/hugetlb.h | 2 +
> include/linux/migrate.h | 3 +
> mm/hugetlb.c | 4 +-
> mm/migrate.c | 139 ++++++++++++++++++++++++++++++++++++++++
> 4 files changed, 146 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
> index 087fd5f48c91..1eed0cdaec0e 100644
> --- a/include/linux/hugetlb.h
> +++ b/include/linux/hugetlb.h
> @@ -371,6 +371,8 @@ struct page *alloc_huge_page_nodemask(struct hstate *h, int preferred_nid,
> nodemask_t *nmask);
> struct page *alloc_huge_page_vma(struct hstate *h, struct vm_area_struct *vma,
> unsigned long address);
> +struct page *alloc_migrate_huge_page(struct hstate *h, gfp_t gfp_mask,
> + int nid, nodemask_t *nmask);
> int huge_add_to_page_cache(struct page *page, struct address_space *mapping,
> pgoff_t idx);
>
> diff --git a/include/linux/migrate.h b/include/linux/migrate.h
> index f2b4abbca55e..d82b35afd2eb 100644
> --- a/include/linux/migrate.h
> +++ b/include/linux/migrate.h
> @@ -286,6 +286,9 @@ static inline int migrate_vma(const struct migrate_vma_ops *ops,
> }
> #endif /* IS_ENABLED(CONFIG_MIGRATE_VMA_HELPER) */
>
> +extern int get_user_pages_cma_migrate(unsigned long start, int nr_pages, int write,
> + struct page **pages);
ah, sorry for commenting the same patch again but
./scripts/checkpatch.pl complains a log on this patch.
--
Alexey
next prev parent reply other threads:[~2018-12-20 4:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-19 3:40 [PATCH V5 0/3] mm/kvm/vfio/ppc64: Migrate compound pages out of CMA region Aneesh Kumar K.V
2018-12-19 3:40 ` [PATCH V5 1/3] mm: Add get_user_pages_cma_migrate Aneesh Kumar K.V
2018-12-20 4:19 ` Alexey Kardashevskiy
2018-12-20 5:22 ` Aneesh Kumar K.V
2018-12-20 5:48 ` Alexey Kardashevskiy
2018-12-20 5:52 ` Aneesh Kumar K.V
2018-12-20 6:20 ` Alexey Kardashevskiy
2018-12-20 6:26 ` Aneesh Kumar K.V
2018-12-20 4:28 ` Alexey Kardashevskiy [this message]
2018-12-19 3:40 ` [PATCH V5 2/3] powerpc/mm/iommu: Allow migration of cma allocated pages during mm_iommu_get Aneesh Kumar K.V
2018-12-20 5:16 ` Alexey Kardashevskiy
2018-12-19 3:40 ` [PATCH V5 3/3] powerpc/mm/iommu: Allow large IOMMU page size only for hugetlb backing Aneesh Kumar K.V
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=da69679a-9455-aea6-6d3c-f36c2b8c641b@ozlabs.ru \
--to=aik@ozlabs.ru \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.ibm.com \
--cc=david@gibson.dropbear.id.au \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mhocko@kernel.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.org \
/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