From: Vlastimil Babka <vbabka@suse.cz>
To: js1304@gmail.com, Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
kernel-team@lge.com, Christoph Hellwig <hch@infradead.org>,
Roman Gushchin <guro@fb.com>,
Mike Kravetz <mike.kravetz@oracle.com>,
Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
Michal Hocko <mhocko@suse.com>,
"Aneesh Kumar K . V" <aneesh.kumar@linux.ibm.com>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>
Subject: Re: [PATCH 3/4] mm/hugetlb: make hugetlb migration callback CMA aware
Date: Wed, 15 Jul 2020 11:51:14 +0200 [thread overview]
Message-ID: <d2a26d81-ce9a-c24c-a2f7-d3b1fa2184d4@suse.cz> (raw)
In-Reply-To: <1594789529-6206-3-git-send-email-iamjoonsoo.kim@lge.com>
On 7/15/20 7:05 AM, js1304@gmail.com wrote:
> From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
>
> new_non_cma_page() in gup.c requires to allocate the new page that is not
> on the CMA area. new_non_cma_page() implements it by using allocation
> scope APIs.
>
> However, there is a work-around for hugetlb. Normal hugetlb page
> allocation API for migration is alloc_huge_page_nodemask(). It consists
> of two steps. First is dequeing from the pool. Second is, if there is no
> available page on the queue, allocating by using the page allocator.
>
> new_non_cma_page() can't use this API since first step (deque) isn't
> aware of scope API to exclude CMA area. So, new_non_cma_page() exports
> hugetlb internal function for the second step, alloc_migrate_huge_page(),
> to global scope and uses it directly. This is suboptimal since hugetlb
> pages on the queue cannot be utilized.
>
> This patch tries to fix this situation by making the deque function on
> hugetlb CMA aware. In the deque function, CMA memory is skipped if
> PF_MEMALLOC_NOCMA flag is found.
>
> Acked-by: Mike Kravetz <mike.kravetz@oracle.com>
> Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
next prev parent reply other threads:[~2020-07-15 9:51 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-15 5:05 [PATCH 1/4] mm/page_alloc: fix non cma alloc context js1304
2020-07-15 5:05 ` [PATCH 2/4] mm/gup: restrict CMA region by using allocation scope API js1304
2020-07-15 8:24 ` Michal Hocko
2020-07-17 7:46 ` Joonsoo Kim
2020-07-17 8:26 ` Michal Hocko
2020-07-17 9:28 ` Joonsoo Kim
2020-07-17 11:08 ` Michal Hocko
2020-07-15 5:05 ` [PATCH 3/4] mm/hugetlb: make hugetlb migration callback CMA aware js1304
2020-07-15 8:33 ` Michal Hocko
2020-07-15 9:51 ` Vlastimil Babka [this message]
2020-07-15 5:05 ` [PATCH 4/4] mm/gup: use a standard migration target allocation callback js1304
2020-07-15 8:36 ` Michal Hocko
2020-07-15 8:24 ` [PATCH 1/4] mm/page_alloc: fix non cma alloc context Vlastimil Babka
2020-07-16 7:27 ` Joonsoo Kim
2020-07-16 7:45 ` Vlastimil Babka
2020-07-17 7:29 ` Joonsoo Kim
2020-07-17 8:10 ` Vlastimil Babka
2020-07-17 8:15 ` Vlastimil Babka
2020-07-17 9:12 ` Joonsoo Kim
2020-07-15 8:28 ` Michal Hocko
2020-07-17 8:32 ` David Laight
2020-07-17 9:14 ` Joonsoo Kim
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=d2a26d81-ce9a-c24c-a2f7-d3b1fa2184d4@suse.cz \
--to=vbabka@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.ibm.com \
--cc=guro@fb.com \
--cc=hch@infradead.org \
--cc=iamjoonsoo.kim@lge.com \
--cc=js1304@gmail.com \
--cc=kernel-team@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=mike.kravetz@oracle.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).