linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: "Kirill A. Shutemov" <kirill@shutemov.name>
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 13:02:08 +0100	[thread overview]
Message-ID: <56B48F40.1060205@suse.cz> (raw)
In-Reply-To: <20160205001459.GA24412@node.shutemov.name>

On 02/05/2016 01:14 AM, Kirill A. Shutemov wrote:
>>  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?

Crap, thanks. This file was hidden in different commit and didn't cause
compilation failure. Patch below, tested that 1gb pages are available
with COMPACTION+ISOLATION.

----8<----
From: Vlastimil Babka <vbabka@suse.cz>
Date: Fri, 5 Feb 2016 10:59:38 +0100
Subject: [PATCH 2/2] 
 mm-hugetlb-dont-require-cma-for-runtime-gigantic-pages-fix2

Update also arch-specific code as Kirill pointed out.

Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
---
 arch/x86/mm/hugetlbpage.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/mm/hugetlbpage.c b/arch/x86/mm/hugetlbpage.c
index 42982b26e32b..740d7ac03a55 100644
--- a/arch/x86/mm/hugetlbpage.c
+++ b/arch/x86/mm/hugetlbpage.c
@@ -173,10 +173,10 @@ static __init int setup_hugepagesz(char *opt)
 }
 __setup("hugepagesz=", setup_hugepagesz);
 
-#ifdef CONFIG_CMA
+#if (defined(CONFIG_MEMORY_ISOLATION) && defined(CONFIG_COMPACTION)) || defined(CONFIG_CMA)
 static __init int gigantic_pages_init(void)
 {
-	/* With CMA we can allocate gigantic pages at runtime */
+	/* With compaction or CMA we can allocate gigantic pages at runtime */
 	if (cpu_has_gbpages && !size_to_hstate(1UL << PUD_SHIFT))
 		hugetlb_add_hstate(PUD_SHIFT - PAGE_SHIFT);
 	return 0;
-- 
2.7.0


--
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>

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

Thread overview: 6+ 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-04  6:02 ` Joonsoo Kim
2016-02-04  9:30   ` Vlastimil Babka
2016-02-04 10:15     ` Vlastimil Babka
2016-02-05  0:14       ` Kirill A. Shutemov
2016-02-05 12:02         ` Vlastimil Babka [this message]

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=56B48F40.1060205@suse.cz \
    --to=vbabka@suse.cz \
    --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=kirill@shutemov.name \
    --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=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 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).