lkml.org 
[lkml]   [2021]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] Increase page and bit waitqueue hash size
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
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2021-03-17 12:27    [W:0.118 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site