From: kernel test robot <lkp@intel.com>
To: Song Liu <song@kernel.org>,
bpf@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Cc: kbuild-all@lists.01.org, ast@kernel.org, daniel@iogearbox.net,
kernel-team@fb.com, akpm@linux-foundation.org,
rick.p.edgecombe@intel.com, hch@infradead.org,
imbrenda@linux.ibm.com, mcgrof@kernel.org,
Song Liu <song@kernel.org>, Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH bpf 2/4] page_alloc: use vmalloc_huge for large system hash
Date: Fri, 22 Apr 2022 17:06:50 +0800 [thread overview]
Message-ID: <202204221628.82Qczjsq-lkp@intel.com> (raw)
In-Reply-To: <20220422051813.1989257-3-song@kernel.org>
Hi Song,
I love your patch! Yet something to improve:
[auto build test ERROR on bpf/master]
url: https://github.com/intel-lab-lkp/linux/commits/Song-Liu/bpf_prog_pack-and-vmalloc-on-huge-page-fixes/20220422-133605
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git master
config: i386-randconfig-a001 (https://download.01.org/0day-ci/archive/20220422/202204221628.82Qczjsq-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.2.0-20) 11.2.0
reproduce (this is a W=1 build):
# https://github.com/intel-lab-lkp/linux/commit/239fb9ca743cf33db8d56df7957726e19aea87d5
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Song-Liu/bpf_prog_pack-and-vmalloc-on-huge-page-fixes/20220422-133605
git checkout 239fb9ca743cf33db8d56df7957726e19aea87d5
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
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/page_alloc.c: In function 'alloc_large_system_hash':
>> mm/page_alloc.c:8921:33: error: implicit declaration of function 'vmalloc_huge'; did you mean 'vmalloc_no_huge'? [-Werror=implicit-function-declaration]
8921 | table = vmalloc_huge(size, gfp_flags);
| ^~~~~~~~~~~~
| vmalloc_no_huge
>> mm/page_alloc.c:8921:31: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
8921 | table = vmalloc_huge(size, gfp_flags);
| ^
cc1: some warnings being treated as errors
vim +8921 mm/page_alloc.c
8876
8877 /* limit to 1 bucket per 2^scale bytes of low memory */
8878 if (scale > PAGE_SHIFT)
8879 numentries >>= (scale - PAGE_SHIFT);
8880 else
8881 numentries <<= (PAGE_SHIFT - scale);
8882
8883 /* Make sure we've got at least a 0-order allocation.. */
8884 if (unlikely(flags & HASH_SMALL)) {
8885 /* Makes no sense without HASH_EARLY */
8886 WARN_ON(!(flags & HASH_EARLY));
8887 if (!(numentries >> *_hash_shift)) {
8888 numentries = 1UL << *_hash_shift;
8889 BUG_ON(!numentries);
8890 }
8891 } else if (unlikely((numentries * bucketsize) < PAGE_SIZE))
8892 numentries = PAGE_SIZE / bucketsize;
8893 }
8894 numentries = roundup_pow_of_two(numentries);
8895
8896 /* limit allocation size to 1/16 total memory by default */
8897 if (max == 0) {
8898 max = ((unsigned long long)nr_all_pages << PAGE_SHIFT) >> 4;
8899 do_div(max, bucketsize);
8900 }
8901 max = min(max, 0x80000000ULL);
8902
8903 if (numentries < low_limit)
8904 numentries = low_limit;
8905 if (numentries > max)
8906 numentries = max;
8907
8908 log2qty = ilog2(numentries);
8909
8910 gfp_flags = (flags & HASH_ZERO) ? GFP_ATOMIC | __GFP_ZERO : GFP_ATOMIC;
8911 do {
8912 virt = false;
8913 size = bucketsize << log2qty;
8914 if (flags & HASH_EARLY) {
8915 if (flags & HASH_ZERO)
8916 table = memblock_alloc(size, SMP_CACHE_BYTES);
8917 else
8918 table = memblock_alloc_raw(size,
8919 SMP_CACHE_BYTES);
8920 } else if (get_order(size) >= MAX_ORDER || hashdist) {
> 8921 table = vmalloc_huge(size, gfp_flags);
8922 virt = true;
8923 if (table)
8924 huge = is_vm_area_hugepages(table);
8925 } else {
8926 /*
8927 * If bucketsize is not a power-of-two, we may free
8928 * some pages at the end of hash table which
8929 * alloc_pages_exact() automatically does
8930 */
8931 table = alloc_pages_exact(size, gfp_flags);
8932 kmemleak_alloc(table, size, 1, gfp_flags);
8933 }
8934 } while (!table && size > PAGE_SIZE && --log2qty);
8935
8936 if (!table)
8937 panic("Failed to allocate %s hash table\n", tablename);
8938
8939 pr_info("%s hash table entries: %ld (order: %d, %lu bytes, %s)\n",
8940 tablename, 1UL << log2qty, ilog2(size) - PAGE_SHIFT, size,
8941 virt ? (huge ? "vmalloc hugepage" : "vmalloc") : "linear");
8942
8943 if (_hash_shift)
8944 *_hash_shift = log2qty;
8945 if (_hash_mask)
8946 *_hash_mask = (1 << log2qty) - 1;
8947
8948 return table;
8949 }
8950
--
0-DAY CI Kernel Test Service
https://01.org/lkp
next prev parent reply other threads:[~2022-04-22 9:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-22 5:18 [PATCH bpf 0/4] bpf_prog_pack and vmalloc-on-huge-page fixes Song Liu
2022-04-22 5:18 ` [PATCH bpf 1/4] bpf: invalidate unused part of bpf_prog_pack Song Liu
2022-04-22 5:18 ` [PATCH bpf 2/4] page_alloc: use vmalloc_huge for large system hash Song Liu
2022-04-22 9:06 ` kernel test robot [this message]
2022-04-22 5:18 ` [PATCH bpf 3/4] module: introduce module_alloc_huge Song Liu
2022-04-22 9:48 ` kernel test robot
2022-04-22 5:18 ` [PATCH bpf 4/4] bpf: use module_alloc_huge for bpf_prog_pack Song Liu
2022-04-22 14:42 ` [PATCH bpf 0/4] bpf_prog_pack and vmalloc-on-huge-page fixes Luis Chamberlain
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=202204221628.82Qczjsq-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=hch@infradead.org \
--cc=hch@lst.de \
--cc=imbrenda@linux.ibm.com \
--cc=kbuild-all@lists.01.org \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mcgrof@kernel.org \
--cc=rick.p.edgecombe@intel.com \
--cc=song@kernel.org \
/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