linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Nicholas Piggin <npiggin@gmail.com>, linux-kernel@vger.kernel.org
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	Nicholas Piggin <npiggin@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Memory Management List <linux-mm@kvack.org>,
	Anton Blanchard <anton@ozlabs.org>,
	Ingo Molnar <mingo@kernel.org>
Subject: Re: [PATCH v2] Increase page and bit waitqueue hash size
Date: Wed, 17 Mar 2021 19:30:11 +0800	[thread overview]
Message-ID: <202103171901.9pxe5bgg-lkp@intel.com> (raw)
In-Reply-To: <20210317075427.587806-1-npiggin@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 6165 bytes --]

Hi Nicholas,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linux/master]
[also build test WARNING on linus/master hnaz-linux-mm/master v5.12-rc3 next-20210317]
[cannot apply to tip/sched/core]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Nicholas-Piggin/Increase-page-and-bit-waitqueue-hash-size/20210317-155619
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git a74e6a014c9d4d4161061f770c9b4f98372ac778
config: x86_64-randconfig-a015-20210317 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8ef111222a3dd12a9175f69c3bff598c46e8bdf7)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://github.com/0day-ci/linux/commit/d741b0903849631440ae34fb070178e9743c6928
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Nicholas-Piggin/Increase-page-and-bit-waitqueue-hash-size/20210317-155619
        git checkout d741b0903849631440ae34fb070178e9743c6928
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> mm/filemap.c:997:42: warning: variable length arrays are a C99 feature [-Wvla-extension]
   static wait_queue_head_t page_wait_table[PAGE_WAIT_TABLE_SIZE] __cacheline_aligned;
                                            ^~~~~~~~~~~~~~~~~~~~
   mm/filemap.c:994:30: note: expanded from macro 'PAGE_WAIT_TABLE_SIZE'
   #define PAGE_WAIT_TABLE_SIZE (1 << page_wait_table_bits)
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   mm/filemap.c:1018:8: error: passing 'const unsigned int *' to parameter of type 'unsigned int *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
                                                           &page_wait_table_bits,
                                                           ^~~~~~~~~~~~~~~~~~~~~
   include/linux/memblock.h:579:24: note: passing argument to parameter '_hash_shift' here
                                        unsigned int *_hash_shift,
                                                      ^
   mm/filemap.c:1013:19: error: array type 'wait_queue_head_t [16]' is not assignable
                   page_wait_table = alloc_large_system_hash("page waitqueue hash",
                   ~~~~~~~~~~~~~~~ ^
   1 warning and 2 errors generated.
--
>> kernel/sched/wait_bit.c:11:41: warning: variable length arrays are a C99 feature [-Wvla-extension]
   static wait_queue_head_t bit_wait_table[BIT_WAIT_TABLE_SIZE] __cacheline_aligned;
                                           ^~~~~~~~~~~~~~~~~~~
   kernel/sched/wait_bit.c:8:29: note: expanded from macro 'BIT_WAIT_TABLE_SIZE'
   #define BIT_WAIT_TABLE_SIZE (1 << bit_wait_table_bits)
                               ^~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/sched/wait_bit.c:260:8: error: passing 'const unsigned int *' to parameter of type 'unsigned int *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
                                                           &bit_wait_table_bits,
                                                           ^~~~~~~~~~~~~~~~~~~~
   include/linux/memblock.h:579:24: note: passing argument to parameter '_hash_shift' here
                                        unsigned int *_hash_shift,
                                                      ^
   kernel/sched/wait_bit.c:255:18: error: array type 'wait_queue_head_t [8]' is not assignable
                   bit_wait_table = alloc_large_system_hash("bit waitqueue hash",
                   ~~~~~~~~~~~~~~ ^
   1 warning and 2 errors generated.


vim +997 mm/filemap.c

44110fe385af23 Paul Jackson    2006-03-24   983  
^1da177e4c3f41 Linus Torvalds  2005-04-16   984  /*
^1da177e4c3f41 Linus Torvalds  2005-04-16   985   * In order to wait for pages to become available there must be
^1da177e4c3f41 Linus Torvalds  2005-04-16   986   * waitqueues associated with pages. By using a hash table of
^1da177e4c3f41 Linus Torvalds  2005-04-16   987   * waitqueues where the bucket discipline is to maintain all
^1da177e4c3f41 Linus Torvalds  2005-04-16   988   * waiters on the same queue and wake all when any of the pages
^1da177e4c3f41 Linus Torvalds  2005-04-16   989   * become available, and for the woken contexts to check to be
^1da177e4c3f41 Linus Torvalds  2005-04-16   990   * sure the appropriate page became available, this saves space
^1da177e4c3f41 Linus Torvalds  2005-04-16   991   * at a cost of "thundering herd" phenomena during rare hash
^1da177e4c3f41 Linus Torvalds  2005-04-16   992   * collisions.
^1da177e4c3f41 Linus Torvalds  2005-04-16   993   */
d741b090384963 Nicholas Piggin 2021-03-17   994  #define PAGE_WAIT_TABLE_SIZE (1 << page_wait_table_bits)
d741b090384963 Nicholas Piggin 2021-03-17   995  #if CONFIG_BASE_SMALL
d741b090384963 Nicholas Piggin 2021-03-17   996  static const unsigned int page_wait_table_bits = 4;
62906027091f1d Nicholas Piggin 2016-12-25  @997  static wait_queue_head_t page_wait_table[PAGE_WAIT_TABLE_SIZE] __cacheline_aligned;
d741b090384963 Nicholas Piggin 2021-03-17   998  #else
d741b090384963 Nicholas Piggin 2021-03-17   999  static unsigned int page_wait_table_bits __ro_after_init;
d741b090384963 Nicholas Piggin 2021-03-17  1000  static wait_queue_head_t *page_wait_table __ro_after_init;
d741b090384963 Nicholas Piggin 2021-03-17  1001  #endif
62906027091f1d Nicholas Piggin 2016-12-25  1002  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 38529 bytes --]

  parent reply	other threads:[~2021-03-17 11:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-17  7:54 [PATCH v2] Increase page and bit waitqueue hash size Nicholas Piggin
2021-03-17  8:38 ` Ingo Molnar
2021-03-17 10:02   ` Nicholas Piggin
2021-03-17 10:12 ` Rasmus Villemoes
2021-03-17 10:44   ` Nicholas Piggin
2021-03-17 19:26     ` Linus Torvalds
2021-03-17 22:22       ` Nicholas Piggin
2021-03-17 23:13         ` Linus Torvalds
2021-03-17 11:25 ` kernel test robot
2021-03-17 11:30 ` kernel test robot [this message]
2021-03-17 12:38 ` [tip: sched/core] sched/wait_bit, mm/filemap: " tip-bot2 for Nicholas Piggin
2021-03-17 15:16   ` Thomas Gleixner
2021-03-17 19:54     ` Ingo Molnar

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=202103171901.9pxe5bgg-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=anton@ozlabs.org \
    --cc=clang-built-linux@googlegroups.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mingo@kernel.org \
    --cc=npiggin@gmail.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).