All of lore.kernel.org
 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, 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:25:22 +0800	[thread overview]
Message-ID: <202103171903.OcF1Y72B-lkp@intel.com> (raw)
In-Reply-To: <20210317075427.587806-1-npiggin@gmail.com>

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

Hi Nicholas,

I love your patch! Yet something to improve:

[auto build test ERROR on linux/master]
[also build test ERROR on tip/sched/core linus/master v5.12-rc3 next-20210317]
[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: nds32-randconfig-r016-20210317 (attached as .config)
compiler: nds32le-linux-gcc (GCC) 9.3.0
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
        # 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=gcc-9.3.0 make.cross ARCH=nds32 

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

All error/warnings (new ones prefixed by >>):

>> mm/filemap.c:997:26: error: variably modified 'page_wait_table' at file scope
     997 | static wait_queue_head_t page_wait_table[PAGE_WAIT_TABLE_SIZE] __cacheline_aligned;
         |                          ^~~~~~~~~~~~~~~
   mm/filemap.c: In function 'pagecache_init':
>> mm/filemap.c:1018:8: warning: passing argument 6 of 'alloc_large_system_hash' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
    1018 |        &page_wait_table_bits,
         |        ^~~~~~~~~~~~~~~~~~~~~
   In file included from mm/filemap.c:37:
   include/linux/memblock.h:574:14: note: expected 'unsigned int *' but argument is of type 'const unsigned int *'
     574 | extern void *alloc_large_system_hash(const char *tablename,
         |              ^~~~~~~~~~~~~~~~~~~~~~~
>> mm/filemap.c:1013:19: error: assignment to expression with array type
    1013 |   page_wait_table = alloc_large_system_hash("page waitqueue hash",
         |                   ^
--
>> kernel/sched/wait_bit.c:11:26: error: variably modified 'bit_wait_table' at file scope
      11 | static wait_queue_head_t bit_wait_table[BIT_WAIT_TABLE_SIZE] __cacheline_aligned;
         |                          ^~~~~~~~~~~~~~
   kernel/sched/wait_bit.c: In function 'wait_bit_init':
>> kernel/sched/wait_bit.c:260:8: warning: passing argument 6 of 'alloc_large_system_hash' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     260 |        &bit_wait_table_bits,
         |        ^~~~~~~~~~~~~~~~~~~~
   In file included from kernel/sched/wait_bit.c:5:
   include/linux/memblock.h:574:14: note: expected 'unsigned int *' but argument is of type 'const unsigned int *'
     574 | extern void *alloc_large_system_hash(const char *tablename,
         |              ^~~~~~~~~~~~~~~~~~~~~~~
>> kernel/sched/wait_bit.c:255:18: error: assignment to expression with array type
     255 |   bit_wait_table = alloc_large_system_hash("bit waitqueue hash",
         |                  ^


vim +/page_wait_table +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  
62906027091f1d Nicholas Piggin 2016-12-25  1003  static wait_queue_head_t *page_waitqueue(struct page *page)
^1da177e4c3f41 Linus Torvalds  2005-04-16  1004  {
d741b090384963 Nicholas Piggin 2021-03-17  1005  	return &page_wait_table[hash_ptr(page, page_wait_table_bits)];
^1da177e4c3f41 Linus Torvalds  2005-04-16  1006  }
^1da177e4c3f41 Linus Torvalds  2005-04-16  1007  
62906027091f1d Nicholas Piggin 2016-12-25  1008  void __init pagecache_init(void)
^1da177e4c3f41 Linus Torvalds  2005-04-16  1009  {
62906027091f1d Nicholas Piggin 2016-12-25  1010  	int i;
62906027091f1d Nicholas Piggin 2016-12-25  1011  
d741b090384963 Nicholas Piggin 2021-03-17  1012  	if (!CONFIG_BASE_SMALL) {
d741b090384963 Nicholas Piggin 2021-03-17 @1013  		page_wait_table = alloc_large_system_hash("page waitqueue hash",
d741b090384963 Nicholas Piggin 2021-03-17  1014  							sizeof(wait_queue_head_t),
d741b090384963 Nicholas Piggin 2021-03-17  1015  							0,
d741b090384963 Nicholas Piggin 2021-03-17  1016  							21,
d741b090384963 Nicholas Piggin 2021-03-17  1017  							0,
d741b090384963 Nicholas Piggin 2021-03-17 @1018  							&page_wait_table_bits,
d741b090384963 Nicholas Piggin 2021-03-17  1019  							NULL,
d741b090384963 Nicholas Piggin 2021-03-17  1020  							0,
d741b090384963 Nicholas Piggin 2021-03-17  1021  							0);
d741b090384963 Nicholas Piggin 2021-03-17  1022  	}
d741b090384963 Nicholas Piggin 2021-03-17  1023  
62906027091f1d Nicholas Piggin 2016-12-25  1024  	for (i = 0; i < PAGE_WAIT_TABLE_SIZE; i++)
62906027091f1d Nicholas Piggin 2016-12-25  1025  		init_waitqueue_head(&page_wait_table[i]);
^1da177e4c3f41 Linus Torvalds  2005-04-16  1026  
62906027091f1d Nicholas Piggin 2016-12-25  1027  	page_writeback_init();
^1da177e4c3f41 Linus Torvalds  2005-04-16  1028  }
^1da177e4c3f41 Linus Torvalds  2005-04-16  1029  

---
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: 25520 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v2] Increase page and bit waitqueue hash size
Date: Wed, 17 Mar 2021 19:25:22 +0800	[thread overview]
Message-ID: <202103171903.OcF1Y72B-lkp@intel.com> (raw)
In-Reply-To: <20210317075427.587806-1-npiggin@gmail.com>

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

Hi Nicholas,

I love your patch! Yet something to improve:

[auto build test ERROR on linux/master]
[also build test ERROR on tip/sched/core linus/master v5.12-rc3 next-20210317]
[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: nds32-randconfig-r016-20210317 (attached as .config)
compiler: nds32le-linux-gcc (GCC) 9.3.0
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
        # 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=gcc-9.3.0 make.cross ARCH=nds32 

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

All error/warnings (new ones prefixed by >>):

>> mm/filemap.c:997:26: error: variably modified 'page_wait_table' at file scope
     997 | static wait_queue_head_t page_wait_table[PAGE_WAIT_TABLE_SIZE] __cacheline_aligned;
         |                          ^~~~~~~~~~~~~~~
   mm/filemap.c: In function 'pagecache_init':
>> mm/filemap.c:1018:8: warning: passing argument 6 of 'alloc_large_system_hash' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
    1018 |        &page_wait_table_bits,
         |        ^~~~~~~~~~~~~~~~~~~~~
   In file included from mm/filemap.c:37:
   include/linux/memblock.h:574:14: note: expected 'unsigned int *' but argument is of type 'const unsigned int *'
     574 | extern void *alloc_large_system_hash(const char *tablename,
         |              ^~~~~~~~~~~~~~~~~~~~~~~
>> mm/filemap.c:1013:19: error: assignment to expression with array type
    1013 |   page_wait_table = alloc_large_system_hash("page waitqueue hash",
         |                   ^
--
>> kernel/sched/wait_bit.c:11:26: error: variably modified 'bit_wait_table' at file scope
      11 | static wait_queue_head_t bit_wait_table[BIT_WAIT_TABLE_SIZE] __cacheline_aligned;
         |                          ^~~~~~~~~~~~~~
   kernel/sched/wait_bit.c: In function 'wait_bit_init':
>> kernel/sched/wait_bit.c:260:8: warning: passing argument 6 of 'alloc_large_system_hash' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     260 |        &bit_wait_table_bits,
         |        ^~~~~~~~~~~~~~~~~~~~
   In file included from kernel/sched/wait_bit.c:5:
   include/linux/memblock.h:574:14: note: expected 'unsigned int *' but argument is of type 'const unsigned int *'
     574 | extern void *alloc_large_system_hash(const char *tablename,
         |              ^~~~~~~~~~~~~~~~~~~~~~~
>> kernel/sched/wait_bit.c:255:18: error: assignment to expression with array type
     255 |   bit_wait_table = alloc_large_system_hash("bit waitqueue hash",
         |                  ^


vim +/page_wait_table +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  
62906027091f1d Nicholas Piggin 2016-12-25  1003  static wait_queue_head_t *page_waitqueue(struct page *page)
^1da177e4c3f41 Linus Torvalds  2005-04-16  1004  {
d741b090384963 Nicholas Piggin 2021-03-17  1005  	return &page_wait_table[hash_ptr(page, page_wait_table_bits)];
^1da177e4c3f41 Linus Torvalds  2005-04-16  1006  }
^1da177e4c3f41 Linus Torvalds  2005-04-16  1007  
62906027091f1d Nicholas Piggin 2016-12-25  1008  void __init pagecache_init(void)
^1da177e4c3f41 Linus Torvalds  2005-04-16  1009  {
62906027091f1d Nicholas Piggin 2016-12-25  1010  	int i;
62906027091f1d Nicholas Piggin 2016-12-25  1011  
d741b090384963 Nicholas Piggin 2021-03-17  1012  	if (!CONFIG_BASE_SMALL) {
d741b090384963 Nicholas Piggin 2021-03-17 @1013  		page_wait_table = alloc_large_system_hash("page waitqueue hash",
d741b090384963 Nicholas Piggin 2021-03-17  1014  							sizeof(wait_queue_head_t),
d741b090384963 Nicholas Piggin 2021-03-17  1015  							0,
d741b090384963 Nicholas Piggin 2021-03-17  1016  							21,
d741b090384963 Nicholas Piggin 2021-03-17  1017  							0,
d741b090384963 Nicholas Piggin 2021-03-17 @1018  							&page_wait_table_bits,
d741b090384963 Nicholas Piggin 2021-03-17  1019  							NULL,
d741b090384963 Nicholas Piggin 2021-03-17  1020  							0,
d741b090384963 Nicholas Piggin 2021-03-17  1021  							0);
d741b090384963 Nicholas Piggin 2021-03-17  1022  	}
d741b090384963 Nicholas Piggin 2021-03-17  1023  
62906027091f1d Nicholas Piggin 2016-12-25  1024  	for (i = 0; i < PAGE_WAIT_TABLE_SIZE; i++)
62906027091f1d Nicholas Piggin 2016-12-25  1025  		init_waitqueue_head(&page_wait_table[i]);
^1da177e4c3f41 Linus Torvalds  2005-04-16  1026  
62906027091f1d Nicholas Piggin 2016-12-25  1027  	page_writeback_init();
^1da177e4c3f41 Linus Torvalds  2005-04-16  1028  }
^1da177e4c3f41 Linus Torvalds  2005-04-16  1029  

---
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: 25520 bytes --]

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

Thread overview: 17+ 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 19:26       ` Linus Torvalds
2021-03-17 22:22       ` Nicholas Piggin
2021-03-17 23:13         ` Linus Torvalds
2021-03-17 23:13           ` Linus Torvalds
2021-03-17 11:25 ` kernel test robot [this message]
2021-03-17 11:25   ` kernel test robot
2021-03-17 11:30 ` kernel test robot
2021-03-17 11:30   ` kernel test robot
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=202103171903.OcF1Y72B-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=anton@ozlabs.org \
    --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 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.