All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Luiz Capitulino <lcapitulino@redhat.com>,
	"Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>,
	Zhang Yanfei <zhangyanfei@cn.fujitsu.com>,
	Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>,
	Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
	Mel Gorman <mgorman@techsingularity.net>,
	Davidlohr Bueso <dave@stgolabs.net>,
	Hillf Danton <hillf.zj@alibaba-inc.com>,
	Mike Kravetz <mike.kravetz@oracle.com>
Subject: Re: [PATCH] mm, hugetlb: don't require CMA for runtime gigantic pages
Date: Fri, 5 Feb 2016 02:14:59 +0200	[thread overview]
Message-ID: <20160205001459.GA24412@node.shutemov.name> (raw)
In-Reply-To: <56B324D4.6030703@suse.cz>

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

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Luiz Capitulino <lcapitulino@redhat.com>,
	"Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>,
	Zhang Yanfei <zhangyanfei@cn.fujitsu.com>,
	Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>,
	Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
	Mel Gorman <mgorman@techsingularity.net>,
	Davidlohr Bueso <dave@stgolabs.net>,
	Hillf Danton <hillf.zj@alibaba-inc.com>,
	Mike Kravetz <mike.kravetz@oracle.com>
Subject: Re: [PATCH] mm, hugetlb: don't require CMA for runtime gigantic pages
Date: Fri, 5 Feb 2016 02:14:59 +0200	[thread overview]
Message-ID: <20160205001459.GA24412@node.shutemov.name> (raw)
In-Reply-To: <56B324D4.6030703@suse.cz>

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

  reply	other threads:[~2016-02-05  0:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-03 17:50 [PATCH] mm, hugetlb: don't require CMA for runtime gigantic pages Vlastimil Babka
2016-02-03 17:50 ` Vlastimil Babka
2016-02-04  6:02 ` Joonsoo Kim
2016-02-04  6:02   ` Joonsoo Kim
2016-02-04  9:30   ` Vlastimil Babka
2016-02-04  9:30     ` Vlastimil Babka
2016-02-04 10:15     ` Vlastimil Babka
2016-02-04 10:15       ` Vlastimil Babka
2016-02-05  0:14       ` Kirill A. Shutemov [this message]
2016-02-05  0:14         ` Kirill A. Shutemov
2016-02-05 12:02         ` Vlastimil Babka
2016-02-05 12:02           ` Vlastimil Babka

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=20160205001459.GA24412@node.shutemov.name \
    --to=kirill@shutemov.name \
    --cc=akpm@linux-foundation.org \
    --cc=dave@stgolabs.net \
    --cc=hillf.zj@alibaba-inc.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=isimatu.yasuaki@jp.fujitsu.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=lcapitulino@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=mike.kravetz@oracle.com \
    --cc=n-horiguchi@ah.jp.nec.com \
    --cc=vbabka@suse.cz \
    --cc=zhangyanfei@cn.fujitsu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.