Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1327372
| From | "Kirill A. Shutemov" <kirill@shutemov.name> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] mm, hugetlb: don't require CMA for runtime gigantic pages |
| Date | 2016-02-05 01:20 +0100 |
| Message-ID | <qYChZ-XM-21@gated-at.bofh.it> (permalink) |
| References | <qY9SG-58b-17@gated-at.bofh.it> <qYlh9-4Ml-11@gated-at.bofh.it> <qYoym-6KS-5@gated-at.bofh.it> <qYpb4-7ep-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Feb 04, 2016 at 11:15:48AM +0100, Vlastimil Babka wrote:
> On 02/04/2016 10:30 AM, Vlastimil Babka wrote:
> > On 02/04/2016 07:02 AM, Joonsoo Kim wrote:
> >> On Wed, Feb 03, 2016 at 06:50:11PM +0100, Vlastimil Babka wrote:
> >>> Commit 944d9fec8d7a ("hugetlb: add support for gigantic page allocation at
> >>> runtime") has added the runtime gigantic page allocation via
> >>> alloc_contig_range(), making this support available only when CONFIG_CMA is
> >>> enabled. Because it doesn't depend on MIGRATE_CMA pageblocks and the
> >>> associated infrastructure, it is possible with few simple adjustments to
> >>> require only CONFIG_MEMORY_ISOLATION instead of full CONFIG_CMA.
> >>>
> >>> After this patch, alloc_contig_range() and related functions are available
> >>> and used for gigantic pages with just CONFIG_MEMORY_ISOLATION enabled. Note
> >>> CONFIG_CMA selects CONFIG_MEMORY_ISOLATION. This allows supporting runtime
> >>> gigantic pages without the CMA-specific checks in page allocator fastpaths.
> >>
> >> You need to set CONFIG_COMPACTION or CONFIG_CMA to use
> >> isolate_migratepages_range() and others in alloc_contig_range().
> >
> > Hm, right, thanks for catching this. I admit I didn't try disabling
> > compaction during the tests.
>
> Here's a v2. Not the prettiest thing, admittedly.
>
> ----8<----
> From: Vlastimil Babka <vbabka@suse.cz>
> Date: Wed, 3 Feb 2016 17:45:26 +0100
> Subject: [PATCH v2] mm, hugetlb: don't require CMA for runtime gigantic pages
>
> Commit 944d9fec8d7a ("hugetlb: add support for gigantic page allocation at
> runtime") has added the runtime gigantic page allocation via
> alloc_contig_range(), making this support available only when CONFIG_CMA is
> enabled. Because it doesn't depend on MIGRATE_CMA pageblocks and the
> associated infrastructure, it is possible with few simple adjustments to
> require only CONFIG_MEMORY_ISOLATION and CONFIG_COMPACTION instead of full
> CONFIG_CMA.
>
> After this patch, alloc_contig_range() and related functions are available
> and used for gigantic pages with just CONFIG_MEMORY_ISOLATION and
> CONFIG_COMPACTION enabled (or CONFIG_CMA as before). Note CONFIG_CMA selects
> CONFIG_MEMORY_ISOLATION. This allows supporting runtime gigantic pages without
> the CMA-specific checks in page allocator fastpaths.
>
> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
> Cc: Luiz Capitulino <lcapitulino@redhat.com>
> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> Cc: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
> Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
> Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
> Cc: Mel Gorman <mgorman@techsingularity.net>
> Cc: Davidlohr Bueso <dave@stgolabs.net>
> Cc: Hillf Danton <hillf.zj@alibaba-inc.com>
> Cc: Mike Kravetz <mike.kravetz@oracle.com>
> ---
> include/linux/gfp.h | 6 +++---
> mm/hugetlb.c | 2 +-
> mm/page_alloc.c | 2 +-
> 3 files changed, 5 insertions(+), 5 deletions(-)
One more place missed: gigantic_pages_init() in arch/x86/mm/hugetlbpage.c
Could you relax the check there as well?
--
Kirill A. Shutemov
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] mm, hugetlb: don't require CMA for runtime gigantic pages Vlastimil Babka <vbabka@suse.cz> - 2016-02-03 19:00 +0100
Re: [PATCH] mm, hugetlb: don't require CMA for runtime gigantic pages Joonsoo Kim <iamjoonsoo.kim@lge.com> - 2016-02-04 07:10 +0100
Re: [PATCH] mm, hugetlb: don't require CMA for runtime gigantic pages Vlastimil Babka <vbabka@suse.cz> - 2016-02-04 10:40 +0100
Re: [PATCH] mm, hugetlb: don't require CMA for runtime gigantic pages Vlastimil Babka <vbabka@suse.cz> - 2016-02-04 11:20 +0100
Re: [PATCH] mm, hugetlb: don't require CMA for runtime gigantic pages "Kirill A. Shutemov" <kirill@shutemov.name> - 2016-02-05 01:20 +0100
Re: [PATCH] mm, hugetlb: don't require CMA for runtime gigantic pages Vlastimil Babka <vbabka@suse.cz> - 2016-02-05 13:10 +0100
csiph-web