Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1472598

Re: [PATCH] thp: reduce usage of huge zero page's atomic counter

From Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH] thp: reduce usage of huge zero page's atomic counter
Date 2016-08-30 18:10 +0200
Message-ID <sbTLQ-75T-35@gated-at.bofh.it> (permalink)
References <sbooF-3Ql-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] thp: reduce usage of huge zero page's atomic counter Aaron Lu <aaron.lu@intel.com> - 2016-08-29 08:40 +0200
  Re: [PATCH] thp: reduce usage of huge zero page's atomic counter Aaron Lu <aaron.lu@intel.com> - 2016-08-29 11:00 +0200
    Re: [PATCH] thp: reduce usage of huge zero page's atomic counter Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2016-08-29 15:50 +0200
      Re: [PATCH] thp: reduce usage of huge zero page's atomic counter Aaron Lu <aaron.lu@intel.com> - 2016-08-29 16:20 +0200
  Re: [PATCH] thp: reduce usage of huge zero page's atomic counter Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2016-08-29 11:00 +0200
  Re: [PATCH] thp: reduce usage of huge zero page's atomic counter Andrew Morton <akpm@linux-foundation.org> - 2016-08-30 01:00 +0200
    Re: [PATCH] thp: reduce usage of huge zero page's atomic counter Aaron Lu <aaron.lu@intel.com> - 2016-08-30 05:10 +0200
      Re: [PATCH] thp: reduce usage of huge zero page's atomic counter Andrew Morton <akpm@linux-foundation.org> - 2016-08-30 05:40 +0200
        Re: [PATCH] thp: reduce usage of huge zero page's atomic counter Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2016-08-30 06:50 +0200
          Re: [PATCH] thp: reduce usage of huge zero page's atomic counter Andrew Morton <akpm@linux-foundation.org> - 2016-08-30 07:00 +0200
          Re: [PATCH] thp: reduce usage of huge zero page's atomic counter Aaron Lu <aaron.lu@intel.com> - 2016-08-30 08:00 +0200
            Re: [PATCH] thp: reduce usage of huge zero page's atomic counter Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2016-08-30 08:50 +0200
        Re: [PATCH] thp: reduce usage of huge zero page's atomic counter Aaron Lu <aaron.lu@intel.com> - 2016-08-30 08:00 +0200
    Re: [PATCH] thp: reduce usage of huge zero page's atomic counter Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2016-08-30 07:20 +0200
      Re: [PATCH] thp: reduce usage of huge zero page's atomic counter Andrew Morton <akpm@linux-foundation.org> - 2016-08-30 07:20 +0200
  Re: [PATCH] thp: reduce usage of huge zero page's atomic counter Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2016-08-30 18:10 +0200
    [PATCH v2] thp: reduce usage of huge zero page's atomic counter Aaron Lu <aaron.lu@intel.com> - 2016-08-31 04:10 +0200

csiph-web