All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
To: Aaron Lu <aaron.lu@intel.com>
Cc: Linux Memory Management List <linux-mm@kvack.org>,
	"'Kirill A. Shutemov'" <kirill.shutemov@linux.intel.com>,
	Dave Hansen <dave.hansen@intel.com>,
	Tim Chen <tim.c.chen@linux.intel.com>,
	Huang Ying <ying.huang@intel.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Vlastimil Babka <vbabka@suse.cz>,
	Jerome Marchand <jmarchan@redhat.com>,
	Andrea Arcangeli <aarcange@redhat.com>,
	Mel Gorman <mgorman@techsingularity.net>,
	Ebru Akagunduz <ebru.akagunduz@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] thp: reduce usage of huge zero page's atomic counter
Date: Wed, 31 Aug 2016 00:59:19 +0900	[thread overview]
Message-ID: <20160830155919.GA482@swordfish> (raw)
In-Reply-To: <b7e47f2c-8aac-156a-f627-a50db31220f8@intel.com>

On (08/29/16 14:31), Aaron Lu wrote:
> 
> The global zero page is used to satisfy an anonymous read fault. If
> THP(Transparent HugePage) is enabled then the global huge zero page is used.
> The global huge zero page uses an atomic counter for reference counting
> and is allocated/freed dynamically according to its counter value.
> 

Hello,

for !CONFIG_TRANSPARENT_HUGEPAGE configs mm_put_huge_zero_page() is BUILD_BUG(),
which gives the following build error (mmots v4.8-rc4-mmots-2016-08-29-16-56)


  CC      kernel/fork.o
In file included from ./include/asm-generic/bug.h:4:0,
                 from ./arch/x86/include/asm/bug.h:35,
                 from ./include/linux/bug.h:4,
                 from ./include/linux/mmdebug.h:4,
                 from ./include/linux/gfp.h:4,
                 from ./include/linux/slab.h:14,
                 from kernel/fork.c:14:
In function a??mm_put_huge_zero_pagea??,
    inlined from a??__mmputa?? at kernel/fork.c:777:2,
    inlined from a??mmput_async_fna?? at kernel/fork.c:806:2:
./include/linux/compiler.h:495:38: error: call to a??__compiletime_assert_218a?? declared with attribute error: BUILD_BUG failed
  _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
                                      ^
./include/linux/compiler.h:478:4: note: in definition of macro a??__compiletime_asserta??
    prefix ## suffix();    \
    ^~~~~~
./include/linux/compiler.h:495:2: note: in expansion of macro a??_compiletime_asserta??
  _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
  ^~~~~~~~~~~~~~~~~~~
./include/linux/bug.h:51:37: note: in expansion of macro a??compiletime_asserta??
 #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                     ^~~~~~~~~~~~~~~~~~
./include/linux/bug.h:85:21: note: in expansion of macro a??BUILD_BUG_ON_MSGa??
 #define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed")
                     ^~~~~~~~~~~~~~~~
./include/linux/huge_mm.h:218:2: note: in expansion of macro a??BUILD_BUGa??
  BUILD_BUG();
  ^~~~~~~~~
In function a??mm_put_huge_zero_pagea??,
    inlined from a??__mmputa?? at kernel/fork.c:777:2,
    inlined from a??mmputa?? at kernel/fork.c:798:3:
./include/linux/compiler.h:495:38: error: call to a??__compiletime_assert_218a?? declared with attribute error: BUILD_BUG failed
  _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
                                      ^
./include/linux/compiler.h:478:4: note: in definition of macro a??__compiletime_asserta??
    prefix ## suffix();    \
    ^~~~~~
./include/linux/compiler.h:495:2: note: in expansion of macro a??_compiletime_asserta??
  _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
  ^~~~~~~~~~~~~~~~~~~
./include/linux/bug.h:51:37: note: in expansion of macro a??compiletime_asserta??
 #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                     ^~~~~~~~~~~~~~~~~~
./include/linux/bug.h:85:21: note: in expansion of macro a??BUILD_BUG_ON_MSGa??
 #define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed")
                     ^~~~~~~~~~~~~~~~
./include/linux/huge_mm.h:218:2: note: in expansion of macro a??BUILD_BUGa??
  BUILD_BUG();
  ^~~~~~~~~
make[1]: *** [scripts/Makefile.build:291: kernel/fork.o] Error 1
make: *** [Makefile:968: kernel] Error 2


	-ss

--
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: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
To: Aaron Lu <aaron.lu@intel.com>
Cc: Linux Memory Management List <linux-mm@kvack.org>,
	"'Kirill A. Shutemov'" <kirill.shutemov@linux.intel.com>,
	Dave Hansen <dave.hansen@intel.com>,
	Tim Chen <tim.c.chen@linux.intel.com>,
	Huang Ying <ying.huang@intel.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Vlastimil Babka <vbabka@suse.cz>,
	Jerome Marchand <jmarchan@redhat.com>,
	Andrea Arcangeli <aarcange@redhat.com>,
	Mel Gorman <mgorman@techsingularity.net>,
	Ebru Akagunduz <ebru.akagunduz@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] thp: reduce usage of huge zero page's atomic counter
Date: Wed, 31 Aug 2016 00:59:19 +0900	[thread overview]
Message-ID: <20160830155919.GA482@swordfish> (raw)
In-Reply-To: <b7e47f2c-8aac-156a-f627-a50db31220f8@intel.com>

On (08/29/16 14:31), Aaron Lu wrote:
> 
> The global zero page is used to satisfy an anonymous read fault. If
> THP(Transparent HugePage) is enabled then the global huge zero page is used.
> The global huge zero page uses an atomic counter for reference counting
> and is allocated/freed dynamically according to its counter value.
> 

Hello,

for !CONFIG_TRANSPARENT_HUGEPAGE configs mm_put_huge_zero_page() is BUILD_BUG(),
which gives the following build error (mmots v4.8-rc4-mmots-2016-08-29-16-56)


  CC      kernel/fork.o
In file included from ./include/asm-generic/bug.h:4:0,
                 from ./arch/x86/include/asm/bug.h:35,
                 from ./include/linux/bug.h:4,
                 from ./include/linux/mmdebug.h:4,
                 from ./include/linux/gfp.h:4,
                 from ./include/linux/slab.h:14,
                 from kernel/fork.c:14:
In function ‘mm_put_huge_zero_page’,
    inlined from ‘__mmput’ at kernel/fork.c:777:2,
    inlined from ‘mmput_async_fn’ at kernel/fork.c:806:2:
./include/linux/compiler.h:495:38: error: call to ‘__compiletime_assert_218’ declared with attribute error: BUILD_BUG failed
  _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
                                      ^
./include/linux/compiler.h:478:4: note: in definition of macro ‘__compiletime_assert’
    prefix ## suffix();    \
    ^~~~~~
./include/linux/compiler.h:495:2: note: in expansion of macro ‘_compiletime_assert’
  _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
  ^~~~~~~~~~~~~~~~~~~
./include/linux/bug.h:51:37: note: in expansion of macro ‘compiletime_assert’
 #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                     ^~~~~~~~~~~~~~~~~~
./include/linux/bug.h:85:21: note: in expansion of macro ‘BUILD_BUG_ON_MSG’
 #define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed")
                     ^~~~~~~~~~~~~~~~
./include/linux/huge_mm.h:218:2: note: in expansion of macro ‘BUILD_BUG’
  BUILD_BUG();
  ^~~~~~~~~
In function ‘mm_put_huge_zero_page’,
    inlined from ‘__mmput’ at kernel/fork.c:777:2,
    inlined from ‘mmput’ at kernel/fork.c:798:3:
./include/linux/compiler.h:495:38: error: call to ‘__compiletime_assert_218’ declared with attribute error: BUILD_BUG failed
  _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
                                      ^
./include/linux/compiler.h:478:4: note: in definition of macro ‘__compiletime_assert’
    prefix ## suffix();    \
    ^~~~~~
./include/linux/compiler.h:495:2: note: in expansion of macro ‘_compiletime_assert’
  _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
  ^~~~~~~~~~~~~~~~~~~
./include/linux/bug.h:51:37: note: in expansion of macro ‘compiletime_assert’
 #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                     ^~~~~~~~~~~~~~~~~~
./include/linux/bug.h:85:21: note: in expansion of macro ‘BUILD_BUG_ON_MSG’
 #define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed")
                     ^~~~~~~~~~~~~~~~
./include/linux/huge_mm.h:218:2: note: in expansion of macro ‘BUILD_BUG’
  BUILD_BUG();
  ^~~~~~~~~
make[1]: *** [scripts/Makefile.build:291: kernel/fork.o] Error 1
make: *** [Makefile:968: kernel] Error 2


	-ss

  parent reply	other threads:[~2016-08-30 16:00 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-29  6:31 [PATCH] thp: reduce usage of huge zero page's atomic counter Aaron Lu
2016-08-29  6:31 ` Aaron Lu
2016-08-29  8:49 ` Anshuman Khandual
2016-08-29  8:49   ` Anshuman Khandual
2016-08-29  8:53   ` Aaron Lu
2016-08-29  8:53     ` Aaron Lu
2016-08-29 13:47     ` Anshuman Khandual
2016-08-29 13:47       ` Anshuman Khandual
2016-08-29 14:10       ` Aaron Lu
2016-08-29 14:10         ` Aaron Lu
2016-08-29 22:50 ` Andrew Morton
2016-08-29 22:50   ` Andrew Morton
2016-08-30  3:09   ` Aaron Lu
2016-08-30  3:09     ` Aaron Lu
2016-08-30  3:39     ` Andrew Morton
2016-08-30  3:39       ` Andrew Morton
2016-08-30  4:44       ` Anshuman Khandual
2016-08-30  4:44         ` Anshuman Khandual
2016-08-30  4:56         ` Andrew Morton
2016-08-30  4:56           ` Andrew Morton
2016-08-30  5:54         ` Aaron Lu
2016-08-30  5:54           ` Aaron Lu
2016-08-30  6:47           ` Anshuman Khandual
2016-08-30  6:47             ` Anshuman Khandual
2016-08-30  5:51       ` Aaron Lu
2016-08-30  5:51         ` Aaron Lu
2016-08-30  5:14   ` Anshuman Khandual
2016-08-30  5:14     ` Anshuman Khandual
2016-08-30  5:19     ` Andrew Morton
2016-08-30  5:19       ` Andrew Morton
2016-08-30 15:59 ` Sergey Senozhatsky [this message]
2016-08-30 15:59   ` Sergey Senozhatsky
2016-08-31  2:08   ` [PATCH v2] " Aaron Lu
2016-08-31  2:08     ` Aaron Lu

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=20160830155919.GA482@swordfish \
    --to=sergey.senozhatsky@gmail.com \
    --cc=aarcange@redhat.com \
    --cc=aaron.lu@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=dave.hansen@intel.com \
    --cc=ebru.akagunduz@gmail.com \
    --cc=jmarchan@redhat.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=tim.c.chen@linux.intel.com \
    --cc=vbabka@suse.cz \
    --cc=ying.huang@intel.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.